简体   繁体   中英

github. How would one merge all changes from the master branch into another branch?

I'm a game developer. I've been using github while working on a unity3d project for about a month with another programmer. We have both been just committing to the master branch and its suited us fine.
I will now have an artist working on the project while I continue to write code.
I have made him a new branch of the project that he can commit to while I will continue committing to the master.
Is there a way that he can download any commits I make in the master while leaving any new files hes added alone? So lets say hes added a new scene and some image files to his branch.. They will remain unchanged (they do not exist in the master) but any changes to script files I've made in the master will be overwritten in his branch?

This is explained in the git online documentation about branching , see the paragraph under Figure 3-15. Suppose the artist has the new branch checked out, then (s)he just has to merge from the master branch.

$ git merge master

Of course, if you work with a remote repository, the artist might first have to pull to get the changes you made (and pushed).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM