Didn't know about those stash options. I've always used 'git stash save -u' to bring along the untracked files in the stash, that's the more common scenario.
Lesser known Git commands
11–20 of 142 posts
Re: Lesser known Git commands
#12 alias grm="git fetch origin && git reset --hard origin/master"Re: Lesser known Git commands
#13My personal favorite two: jschroeder@omniscience:~$ git config alias.up pull --rebase jschroeder@omniscience:~$ git config alias.down push They can be used thusly: git up && git down
Re: Lesser known Git commands
#14While I'm aware of issues with rebasing the root commit, I've never heard this advice before and it seems unnecessary.
Re: Lesser known Git commands
#15My personal favorite two: jschroeder@omniscience:~$ git config alias.up pull --rebase jschroeder@omniscience:~$ git config alias.down push They can be used thusly: git up && git down
Re: Lesser known Git commands
#16Right from the man page: "If you mistakenly drop or clear stashes, they cannot be recovered through the normal safety mechanisms."
https://git-scm.com/docs/git-stash
--
I do like shorty. My version:
alias gits='git status -sb'
--My next fave is rebase the current branch against it's upstream branch point:
[alias]
rearrange = "!git rebase -i $(git merge-base HEAD @{u})"
git rearrange ftw.Re: Lesser known Git commands
#17I've seen more stash accidents than any other kind with git. Stashing is more dangerous than committing or branching, and to me it doesn't seem to provide any advantages... do people actually find stashing easier than branching? Is it just because when you branch you have to name it, and that causes friction? I stay away from stash. Right from the man page: "If you mistakenly drop or clear stashes, they cannot be rec…
Re: Lesser known Git commands
#18Re: Lesser known Git commands
#19My personal favorite two: jschroeder@omniscience:~$ git config alias.up pull --rebase jschroeder@omniscience:~$ git config alias.down push They can be used thusly: git up && git down
While these aliases are useful, I'm confused why "down" means "push".
Re: Lesser known Git commands
#20My personal favorite two: jschroeder@omniscience:~$ git config alias.up pull --rebase jschroeder@omniscience:~$ git config alias.down push They can be used thusly: git up && git down
"Great now let me DOWNload the changes to another branch" git up
What?