Mostly the basics, as others are saying. Add, commit, push, merge. Occasionally I'll have a legitimate reason to use cherry-pick, which always feels fun to use for some reason.
Even when it is just myself working on something, I try to avoid commands that "rewrite history", so I don't get in the habit of using them.
Things I've been trying to do more of lately:
Branching
Keeps things clean and there is "no cost"
Trying to do this more as opposed to stashing
Using tags
Better commit messages
A neat "trick" I recently learned is how to merge branches without switching to them. Not really needed often, but feels cool to use:
Essentially you're saying fetch . (as an alias for local), get the head / latest commit of {localBranchA}, and then fast-forward {localBranchToMergeAInto} to point to it. See this for details.
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.
Mostly the basics, as others are saying. Add, commit, push, merge. Occasionally I'll have a legitimate reason to use
cherry-pick
, which always feels fun to use for some reason.Even when it is just myself working on something, I try to avoid commands that "rewrite history", so I don't get in the habit of using them.
Things I've been trying to do more of lately:
A neat "trick" I recently learned is how to merge branches without switching to them. Not really needed often, but feels cool to use:
Essentially you're saying fetch
.
(as an alias for local), get the head / latest commit of {localBranchA}, and then fast-forward {localBranchToMergeAInto} to point to it. See this for details.