On Mon, Jan 26, 2009 at 12:54 PM, jschank <[email protected]> wrote:

> Is there a simple way to do a backup of my local repository state to
> some other machine. Mostly because I don't like having the only copy
> of local work in one place.

> Sort of like stash, but stashing to another machine.

Well stash does not save untracked files, only staged and
not-yet-staged changes to *tracked* files.  I suspect untracked files
are equally important to you.

But the following should work (sort of tested).  Note the "git bundle
create" line in particular -- I'm new enough to git to be quite proud
of that one :-)

        # better way to stash
        git commit -m wip-index-state
        git add -A && git commit -m wip-worktree-state
        git branch -f stashed
        # make sure you don't actually have a branch called "stashed"!!

        # save all your local modifications that are NOT also in some
        # remote branch; this will catch that "stashed" branch also
        git bundle create /tmp/sos.bdl --all --not --remotes

        # copy that file wherever you want, however you want...
        # (example:)
        rsync /tmp/sos.bdl bkphost:

        git checkout stashed
        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