3 ms·
If you have had any interaction beyond the basics of git those are trivial to solve. - git rebase -i HEAD~2 -- interactive rebase of last 2 commits then read t
by pearjuice 7y ago
If you have had any interaction beyond the basics of git those are trivial to solve.
- git rebase -i HEAD~2 -- interactive rebase of last 2 commits then read the help you get (use reword on the commit you want to change, needs force push because rewriting history)
- various ways to do this but easiest is: checkout correct branch, cherry-pick commit you want and then hard reset your faulty branch HEAD~1 (you can also soft reset, keep it staging and then checkout correct branch and commit)
- these are all terms you should know if you are using git in my opinion because the commands et cetera will assume you know what they mean. I think it comes with every beginners git tutorial?
- I am pretty sure git status will tell you how to do this by default (which shows staging area)
- this is also properly documented and something a good git guide will gloss over
Maybe I am biased because I use git on a daily basis but I don't think any of these are hard. Anyone who calls themselves an intermediate git user should be able to answer these questions from the top of their head. If you don't, no problem, you can easily Google them and you will notice that they are very straightforward and simple. I am not even sarcastic, git is very simple software (in terms of usage and help/documentation available).