Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- git add path/to/untracked-file
- git stash
- git stash --include-untracked
- git stash -u
- git add path/to/untracked-file
- git stash
- git add -N path/to/untracked/file # note: -N is short for --intent-to-add
- git stash
- path/to/untracked-file: not added yet
- fatal: git-write-tree: error building trees
- Cannot save the current index state
- git add path/to/untracked-file
- git stash save "don't forget to un-add path/to/untracked-file" # stash w/reminder
- # do some other work
- git stash list
- # shows:
- # stash@{0}: On master: don't forget to un-add path/to/untracked-file
- git stash pop # or apply instead of pop, to keep the stash available
- git rm --cached path/to/untracked-file
- git ls-files -o > files-to-untrack
- git add `cat files-to-untrack` # note: files-to-untrack will be listed, itself!
- git stash
- # do some work
- git stash pop
- git rm --cached `cat files-to-untrack`
- rm files-to-untrack
- alias stashall='git ls-files -o > .gftu; git add `cat .gftu`; git stash'
- alias unstashall='git stash pop; git rm --cached `cat .gftu`; rm .gftu'
- function unstashall(){git stash "${@:-pop}";git rm --cached `cat .gftu`;rm .gftu}
- git add --intent-to-add path/to/untracked-file
- git update-index --add --cacheinfo 100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 path/to/untracked-file
- $ git stash
- b.rb: not added yet
- fatal: git-write-tree: error building trees
- Cannot save the current index state
Add Comment
Please, Sign In to add comment