Re: Working from different machines.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





* First, `--mirror` might be what the relation between 'desktop'
  and 'home' repositories should be.



Here's what I'm trying, am I in the right ballpark?

desk> git branch
* master
desk> git checkout -b banana
Switched to a new branch 'banana'
desk> echo 'message' > oracle
desk> git add oracle
desk> git commit -a -moracle
[banana 66e7823] oracle
 1 file changed, 1 insertion(+)
 create mode 100644 oracle
desk> git push --mirror
Counting objects: 3, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 260 bytes | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
To toby@xxxxxxxxxxxxxxxxx:/home/git/toby/exposmart
 * [new branch]      banana -> banana

# Then on another machine:

home> git branch
* master
## Forgot to 'pull' here, but it never shows new branches anyway
## I have to get them by name.  Can I automate that?

home> git checkout banana
Branch banana set up to track remote branch banana from origin.
Switched to a new branch 'banana'
home> cat oracle
message
home> echo 'other message' >> oracle
home> git commit -a -moracle2
[banana 78e6c45] oracle2
 1 file changed, 1 insertion(+)
home> git push --mirror
Counting objects: 36, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (22/22), done.
Writing objects: 100% (36/36), 2.90 KiB | 0 bytes/s, done.
Total 36 (delta 13), reused 14 (delta 4)
To shells.rcsreg.com:/home/git/toby/exposmart
   66e7823..78e6c45  banana -> banana
   7e01bf8..c65ed75  origin/HEAD -> origin/HEAD
 * [new branch]      origin/auto -> origin/auto
 * [new branch]      origin/banana -> origin/banana
 * [new branch]      origin/develop -> origin/develop
 * [new branch]      origin/flipper -> origin/flipper
 * [new branch]      origin/tart -> origin/tart
home> vi
home> git push --mirror
Total 0 (delta 0), reused 0 (delta 0)
To shells.rcsreg.com:/home/git/toby/exposmart
   66e7823..78e6c45  origin/banana -> origin/banana
home> git push --mirror
Everything up-to-date
home>

## Why do I have to push three times to get the 'Everyting up-to-date'
## message?  Why does it still mention 'flipper' and 'tart' and all
## other branches I've played with.  When I delte them locally, I want
## them to be deleted everywhere.  They just keep accumulating.
##
## Now back a the other machine


desk> git pull
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 1), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From shells.rcsreg.com:/home/git/toby/exposmart
   66e7823..78e6c45  banana     -> origin/banana
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

    git branch --set-upstream-to=origin/<branch> banana

desk> git branch
* banana
  master
desk> git pull origin banana
From shells.rcsreg.com:/home/git/toby/exposmart
 * branch            banana     -> FETCH_HEAD
Updating 66e7823..78e6c45
Fast-forward
 oracle | 1 +
 1 file changed, 1 insertion(+)
desk> cat oracle
message
other message


## So it seems to have worked, but the more I go back and forth
## The more I seem to have eventual problems getting branches
## and changes.  Am I doing it right?


Thanks



--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]