Want to make a branch ?

git checkout

Want to make switch branches ?

git checkout

Want to get a specific file version ?

git checkout

Want to get remove changes to one file ?

Believe it or not, also git checkout

You are viewing a single thread.
View all comments View context
4 points
*

You can copy a commit that was pushed in branch 1 and paste it to branch 2

permalink
report
parent
reply
1 point

Thanks. I wonder what effect that has on the git history of branch 2?

For some reason I thought cherry picking might be the ability to take any file from any commit on any branch and copying it to the current branch.

permalink
report
parent
reply
2 points

the pasted commit will be at the top of the history for branch 2

permalink
report
parent
reply
1 point

That seems like it would cause chaos if those branches were ever merged.

permalink
report
parent
reply