Hi all,
I am fairly new to programming and using Git Hub. Git says that my branch is 13 commits behind UnityTechnologies:master.
Simple question. How can I update my repository so that I can work with the latest code?
Thanks,
Christoph
Hi all,
I am fairly new to programming and using Git Hub. Git says that my branch is 13 commits behind UnityTechnologies:master.
Simple question. How can I update my repository so that I can work with the latest code?
Thanks,
Christoph
I think I found a way to update the repository. Did a pull request on my own forked repository and approved it so that the Unity Master gets merged with my forked master.
Looks like that worked. Please let me know, if this was the wrong solution.
Quick question. My repository now says: ‘This branch is 1 commit ahead of UnityTechnologies:master.’
Will that be a problem?
Yes, you could have also just merged (you don’t need to open a request on your own repo).
Merging means that you are taking all the 13 changes that are on master, and merging them into your work. Now that they are merged, you are up to date with master.
If you are ahead it means that you produced new changes, and so now technically Unity’s master is behind you. When you open a pull request (PR) you are asking Unity to pull (and merge) your work into their master, bringing Unity’s master to your level… so they are up to date with you.
Clear?
I was having the same difficulty, since I’ve never had to use forks, pull requests, etc.
I found out this link
It speaks of what Ciro was saying about merging, if you’re using Github Desktop, this might make your job easier, good luck!
Thanks for your reply.
It makes sense, but I wasn’t clear how to merge without doing a pull request. I couldn’t find a merge option or button on github.com when in my repository.
Looks like overnight there were 14 new commits on the master:
‘This branch is 1 commit ahead, 14 commits behind UnityTechnologies:master.’
I am unsure how I can merge those 14 commits from UnityTechnologies:master now into my forked repository.
Pritte, I’ll check out the link that you shared to see if that helps.
Thanks a lot!
yes, I managed to merge the updates into my local repository using GitHub Desktop.
Thanks all for the help!
You can use this extension from the github marketplace for keeping your forked repository upto date. Github will automatically merge the new commits from unity’s repo to your repo as soon as the new merges are made to unity’s repo.
But you will have to work on a new branch not on the master branch or your repository which is recommended whether you use this extension or not.