ssh rechner1 cd /verzeichnis git init git add . git commit -a
ssh rechner2 git clone ssh://rechner1/srv/fai/config git remote add rechner1 ssh://rechner1/srv/fai/config
ssh rechner1
git status git diff --cached
git commit -a
ssh rechner2 git pull
git fetch git log -p HEAD..origin git merge origin
statt git merge
:
git cherry-pick ac1a88a5c235055a41d961e898dfb8c0d3e17f72
Haven't committed yet, but don't want to save the changes? You can throw them away:
git reset --hard
You can also do it for individual files, but it's a bit different:
git checkout myfile.txt
Messed up the commit message? This will let you re-enter it:
git commit --amend
Forgot something in your last commit? That's easy to fix.
git reset --soft HEAD^
Add that stuff you forgot:
git add forgot.txt these.txt
Then write over the last commit:
git commit