So one of the things I’d prefer to do is to work on my website locally then push to github and my server. Easy to say like most concepts…
Now at times I just don’t want to figure things out, as such I chose to use someone elses work. This is a great Article on it. Now despite following the tutorial to a T I ran into issues, not because its a bad tutorial, because for anything, the amount of work and research that goes into something like this is very very very commendable. No work should ever be downplayed, though Its important to look at what is flawed.
I’m not going to rewrite the article but theres a few peices you will want to keep in mind
1) When editing your files from the shell, your most likely going to have to use vi the reason for this is you would have to install other file editors to use them
2) The Command
git remote set-url origin ssh://username@domain.com/~/repo/app_name.git
is actually
git remote add origin ssh://username@domain.com/~/repo/app_name.git
this may seem small, but you’ll be running into headaches if you don’t pay attention
3) if you’d like to include github to the mix, I’ll want to setup an ssh key for github https://help.github.com/articles/generating-ssh-keys
then in a similar fassion
git remote add github git@github.com:UserName/Repository.git
4) Get used to the following commands
-As I’m relatively new to git, I kinda learning the important aspects
Remember to change your directory to the working directory
cd /Path/to/your/local/repository git add . git commit -m "your message" . git push github master git push origin master
I might store this in a script that I’ll just run as needed