Great list, if I was to add one:
git cherry-pick [commit id here] incredibly useful to pick specific commits when you don't want the branch.
git cherry-pick [commit id here]
thank you
It is always better to use git checkout [commit id here || branch name] [filename of other branch] than cherry pick
git checkout [commit id here || branch name] [filename of other branch]
Not always better. They work differently:
cherry-pick
checkout
It really depends on what you want to do. I use both frequently.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Great list, if I was to add one:
git cherry-pick [commit id here]
incredibly useful to pick specific commits when you don't want the branch.thank you
It is always better to use
git checkout [commit id here || branch name] [filename of other branch]
than cherry pickNot always better. They work differently:
cherry-pick
will append the specified commit to the current one.checkout
will bring the specified commit's changes to the working directory (it's up to you to commit those changes).It really depends on what you want to do. I use both frequently.