I am new to git and don't know much about it can anyone help me with this how to get this right it is saying 123 commits behind. I have all tried this what no luck. What I can do to resolve "1 commit behind master"?
Asked
Active
Viewed 153 times
-3
-
1If you're that far behind it's time for `git pull`. – tadman Feb 25 '20 at 18:07
-
Could you write what have you tried? – Michele Dorigatti Feb 25 '20 at 18:20
-
@MicheleDorigatti I don't know what to do at this point. – Rocky_Mental Feb 25 '20 at 18:34
-
@tadman git pull is giving me error. – Rocky_Mental Feb 25 '20 at 18:34
-
1What is your goal, why do you want your branch to be in sync with master? It is not necessarily a problem. – Michele Dorigatti Feb 25 '20 at 18:41
-
Everything is working fine.Before i see this. I am all the latest file from the master locally. And can make a pull request for the same. But i am not able to update my repositery (i.e forked one) because i don't know how to update it. I was following this post https://about.gitlab.com/handbook/create-directory/ – Rocky_Mental Feb 25 '20 at 18:44
1 Answers
3
Short-Answer:
If you want to update your local branch from the remote branch, do git pull --rebase
This will pull all the remote changes and commit them into your local branch, then it will put your local change on top of it. You can then move on with adding local commits and merging to the remote (if you want).

Khalil Khalaf
- 9,259
- 11
- 62
- 104