Wednesday, March 5, 2014

recovering a git mess

You screwed up your remote repository now what??? Just a couple of careful checkouts and commits and everything will be fine: 1. First sort out the SHA of the last good commit, 2. check out file by file all the badly committed version:
git checkout [SHA] foo/bar.py

3. Check out the modifications with
git status
4. Add and commit :
git add foo/bar.py
git commit -m 'fixed foo/bar.py'

thank you +Petr GronĂ¡t 

No comments:

Post a Comment