I’m trying to get a handle on using git. I’ve been using it on my PC running Kubuntu. I installed git flow and everything works like a champ.
Now, however, I need to start using a repo on my server. So, I SSH’ed into the box and created a directory for my repos and one inside of it for this particular repo. Then I moved into the directory and ran:
git init --shared --bare
Then I went to the directory of my app and did the following:
git remote add origin 192.168.1.5:/home/will/Repo/testgit
git push origin master
I tried creating another directory elsewhere on my system and then running:
git clone 192.168.1.5:/home/will/Repo/testgit
However, nothing was in the directory. I also tried going back to my original directory, doing:
git commit
git push origin master
It said there were no changes. How do I fix this?
Will
You need to stage your files before committing them.
Also you should set the files that git should ignore by making a .gitignore file in the root folder which contains the patterns of what to ignore.