|
Working with GitHub repository [updated: 04/02/2015]
|
|
10-29-2015, 05:00 PM
(This post was last modified: 12-14-2018 07:16 AM by micheus.)
Post: #9
|
||||
|
||||
|
[updated: 10/29/2015]
Copying commits from a branch to another
Let say we made some changes and committed them in the wrong branch and we want to move or just copy it to the current branch - we do that using cherry-pick command. The first we need to find the commit ID which we can do by using the log command. A list of commits will be shown: $ git log <source branch> Quote:commit c61c5e42edbc31f49bf3dd373e564dd3742b0d79We need to take note of the only first seven number: c61c5e4 Now, in the current branch, we run the follow command: $ git cherry-pick c61c5e4 Quote:[mv/shaders f2af162] Fixed .auv file parser for menu option controlDone! Copying only a file from a commit to another branch $ git checkout <commit> <folder or file path in the current branch> Retoring a file from a branch $ git checkout <branch> <file path in the current branch>
|
||||
|
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)




@MicheusVieira
MicheusVieira
Micheuss
micheus4wings3d