-2

I am trying to push changes to a remote branch.

I ran following commands:

git fetch origin

git checkout <remote branch>

made my changes

 git add .

 git commit .

Now I want to push my changes. Which command should I use to push the changes to remote branch.

Himanshi
  • 1
  • 1
  • 1
    Hello and welcome to SO! I suggest you take a look **first** into the git documentation for [pushing](https://git-scm.com/docs/git-push). Also [working with remotes](https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes) might be useful for you. – mnestorov Mar 24 '21 at 12:31
  • Does this help? https://stackoverflow.com/a/7690136/10426405 – bsheps Mar 24 '21 at 14:28
  • Does this answer your question? [How to push local changes to a remote git repository on bitbucket](https://stackoverflow.com/questions/7690108/how-to-push-local-changes-to-a-remote-git-repository-on-bitbucket) – bsheps Mar 24 '21 at 14:30

1 Answers1

0

Welcome, please read the documentation

git push <remote> <branch>

So, say for example your remote branch is origin (as I see from your question) and your local branch master, you'd do:

git push origin master
Cedric Ipkiss
  • 3,682
  • 2
  • 30
  • 50