I use Netbeans on 2 computers. I would like to use git to keep the same source code for my project on the 2 computers. I tried this way :
On first computer (192.168.0.1) :
- Select a project on
Netbeans > Team > Git > Initialize
Add
all the files,Commit
- On terminal, wrote the following command to create a bare repository :
git clone --bare myproject myproject.git
cd myproject.git mv hooks/post-update.sample hooks/post-update
git update-server-info
On second computer (192.168.0.2) :
- Launch
Netbeans > Team > Git > Clone
- Enter my repository URL : 192.168.0.1/myproject.git
- Selected Master branche, Parent Directory, etc.
- It worked ! All my project from the First computer on the Second computer.
Now, I would like to push the modification from the first computer to the second computer. I tried this way :
On first computer (192.168.0.1) :
- On netbeans, modify an file, then
Team > Git > Commit
Team > Git > Remote > Push
, then Repository URL is :file:///Users/me/projects/myproject.git/
On second computer (192.168.0.2) :
Team > Git > Remote > Pull
- Repository Location is pre-filled : origin:192.168.0.1/myproject.git/
- Select the master branche.
- Nothing happens. The modifications don't appear.
Where did I made a mistake ?
I actually want to use the workflow displayed here : Git with 2 developers