0

my use case is. I have made changes to my local repo with a branch called feature A. The remote repo is called origin. There have been changes made to origin/master. I need to sync with origin master and push my changes(feature A) to the remote repo.

flutter
  • 4,537
  • 4
  • 32
  • 53
  • https://stackoverflow.com/questions/1443210/updating-a-local-repository-with-changes-from-a-github-repository – phd Feb 22 '19 at 16:29
  • https://stackoverflow.com/search?q=%5Bgit%5D+update+local+repository – phd Feb 22 '19 at 16:29
  • https://stackoverflow.com/questions/2765421/how-do-i-push-a-new-local-branch-to-a-remote-git-repository-and-track-it-too – phd Feb 22 '19 at 16:30
  • https://stackoverflow.com/search?q=%5Bgit%5D+push+remote+repository – phd Feb 22 '19 at 16:30

1 Answers1

1

First you have to use git fetch to load data from your remote repository.
Then you can use git rebase origin/master to move your local changes on top of origin/master, on your local repository.

Now using git push you will push your branch feature A on the remote repository.
If you prefer to push on master, you will have to use the following syntax :git push origin master

spidyx
  • 927
  • 6
  • 14