> > So if you have physical access to your colleagues machine, but not his 
> > password, you can either: 
> > 1) Add a new url using your own username, and then use your own password 
> > when pushing to this url 
> Do you mean I should push my local repository to my colleague's local 
> repository? What would the command for this be? 

I mean this:

cd colleagues-repository
git remote add origin-as-markus markus.username@server:repository.git
git push origin-as-markus master
<enter your own password when prompted>

> 2) Share your colleagues repository, either running git daemon, or first 
> > pushing to a repository where you both have access. 
> Do you mean I should push my colleague's local repository or my own 
> local repository to a repository we both have access? 

No, this is just a mean to get access to your colleague's latest commit. 
Please read on.

> > If this is a problem 
> > network-wise, push to a repository on a USB stick. Once you have access 
> to 
> > his latest commits on your own computer, merge them to your own 
> repository 
> > and then push them to the central remote repo. 
> > 
> So basically I would do a pull (fetch + merge) from my colleagues 
> local repository into my own local repository and then push my merged 

local repository to the remote repository? 

Yes, exactly:

cd your-own-repository
git remote add colleague-repo /shared/colleague/repository
git fetch colleague-repo
git branch -a (find which branch you want to merge in)
git merge colleague-repo/master
git push origin master

All these commands assume that your development branch is called "master".

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To view this discussion on the web visit 
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to