On Mon, Jan 26, 2009 at 10:04 PM, Sitaram Chamarty <[email protected]> wrote:
> An important correction to the script...

and yet another... (I said I'd use it, and I am!)

The latest version is below.  I discovered that, if there happens to
be nothing staged and ready to commit, or nothing untracked/unstaged,
or (worse) neither of those two situations), naturally the two "reset"
instructions at the bottom end up rewinding further than you wanted!

So, added "--allow-empty" to both the commits.

I'll bet the real experts are laughing at all this, especially me
replying to myself repeatedly :-)

    # better than stash; untracked files also saved
    git commit --allow-empty -m wip-index-state
    git add -A && git commit --allow-empty -m wip-worktree-state

    git bundle create /tmp/sos.bdl --all --not --remotes

    # copy that file wherever you want, however you want...
    rsync /tmp/sos.bdl bkphost:   # or scp, or whatever

    # unstash
    git reset --mixed HEAD^
    git reset --soft HEAD^

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"GitHub" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/github?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to