Push your code to the remote Git branch

Photo by Roman Synkevych on Unsplash

If you wish to push the code in your local computer system to a particular branch in remote, then this article is for you. Follow the steps below.

  1. Add a .gitgnore file [The files and directories mentioned in this file will not be pushed to the remote]

2. Initialise git. This command will add a .git file to your local directory

3. Add the files to be committed to the remote code

4. Add a commit message

5. Add it to the remote repository

6. Push it to the master

7. If you wish to push it to some other branch instead of master, run the following command.