Background:
- In a network, there are two PCs, one using Windows 7 and other using Ubuntu 12.10 as their OSs.
- Both have Git installed. Windows one from http://git-scm.com/download/win and Ubuntu one from
apt-get install git-core. - Ubuntu PC has Samba configured so that it is possible to access Windows PCs in the network using their hostnames.
- Using
git clone http://windowspc/system/.git, it was possible to create a clone of the repository from Windows PC in the Ubuntu PC.
Problem:
- Changes are made into the code in the Windows PC. Commands
git add .andgit commit -m"Comment."are issued in the Git prompt in the Windows PC. - Back in Ubuntu PC, when
git fetchandgit pullcommands are issues, the messageAlready up-to-dateis presented. - However, none of the changes made in the Windows PC appear in the Ubuntu PC.
Question
- What should be the path to be taken to get updated files from Windows PC to the Ubuntu PC?
I’m used to doing a ‘git push’ after doing a commit.
I would create a bare repository that is shared by both your windows machine and your Ubuntu machine. I would then amend your instructions to include a ‘git push’ after you commit your changes. You could then use gitk to make sure that everything is up to date. BTW I find that the best way to access git under Windows is by using cygwin.
My method of doing a creation of a bare repository that is shared between Windows and Unix/Linux is:
To connect the new bare repository back to the original source code: