To find when a specific line of code was added to a branch with git, run the following: git log -S "your-string-here" --source --all --stat
Read More
If you want to see the difference between the same file on separate branches, use the following snippet at the CLI: git diff branch1 branch2 — your-file.ext
Read More
If you’ve been working on a common staging branch when you thought you were working on a personal feature branch, you can move your work by doing the following: git checkout feature_branch git cherry-pick SHA (Do this for each commit on the mistaken branch) git checkout staging git reset –hard HEAD~n (where n = the number of mistakenly committed commits) This assumes you haven’t already pushed your changes to a [...]
Read More
Recent Comments