

Since the OP already reset and redone its commit on top of origin/main: git reset -mixed origin/main See " Why do I need to explicitly push a new branch?". That would establish a tracking relationship between your local main branch and its upstream branch.Īfter that, any future push for that branch can be done with a simple: git pushĪgain, with Git 2.37+ and its global option toSetupRemote, a simple git push even for the first one would do the same (I.e: establishing a tracking relationship between your local main branch and its upstream branch origin/main). I would recommend a: # add and commit first See a more complete example in the chapter 6 Pull with rebase of the Git Pocket Book. That way, you would replay (the -rebase part) your local commits on top of the newly updated origin/main (or origin/yourBranch: git pull origin yourBranch). (Note: with Git 2.27 Q2 2020, a tostash is also available for your regular pull, without rebase) 2015), after having done (once) git config -global pull.rebase true
#Ibm fix package central full
The full syntax is: git pull -rebase origin main

If the GitHub repo has seen new commits pushed to it, while you were working locally, I would advise using: git pull -rebase (The following assumes itself is not down, as eri0o points out in the comments: see to be sure) The rest of this 2014 answer has been updated to use " main") And you can rename existing repository default branch from master to main.

2020, any new repository is created with the default branch main, not master.
