tags:

views:

83

answers:

2

Hi, i and a friend are developing a web application and using Git for versioning. In the office we are using a model of a central repository and also, each developer has your personal repository. I and my friend are working from house now, and i have implemented features that my friend needs. How i can send a resume of my commits to my friend, in such way that he can be aware of my improvements? Detail: I'm with more commits than my friend and i don't know at what point ours branchs diverge

+1  A: 

You could do a git push to his repository. The syntax of git push is:

git push [remote-repository-reference] [remote-head-name]

So assuming that the remote repository is named origin and the remote head name is master the command would be:

git push origin master

Executing the above command does two things:

  • Add new commit objects sent by the pushing repository.
  • Set [remote-head-name] to point to the same commit that it points to on the pushing repository.

Hope this helps.

ardsrk
Your friend should run "git checkout HEAD" afterwards, or he won't see your changes. See http://hans.fugal.net/blog/2008/11/10/git-push-is-worse-than-worthless/
blinry
A: 

You have some kind of public repository, don't you? If not, run

git daemon

Your friend can then pull your repository into a new branch, see what's changed and eventually merge:

git checkout -b lucas
git pull git://lucascomputer/
git checkout master
git diff lucas
git merge lucas
blinry
i'm running git on Windows. git daemon doesn't works
Lucas
Have you considered using http://github.com as your public repository? You can easily send pull requests there.
blinry
The problem is that the repository contains a commercial software that we are developing and the bussiness that we working don't have a repository that we can use from house ...
Lucas