- list untracked files, deleted, modified, etc:
- remove deleted files from git:
git ls-files -d | xargs git rm
- change from https to ssh:
git remote set-url origin firstname.lastname@example.org:sysopsteam/chef.git(<<< change this)
- restore one file:
git checkout server.rb
- diff working copy and remote head:
git diff origin/master HEAD
- restore a file that was deleted from the repo:
git checkout $(git rev-list -n 1 HEAD -- "some-users")^ -- "some-users"
How useful was this post?
Click on a star to rate it!
Average rating / 5. Vote count:
No votes so far! Be the first to rate this post.