Git | Github | Summary and get started
Quick setup
- Install git,
sudo apt-get install git
- Create Github account
- In terminal, generate SSH key
cd ~/.ssh && ssh-keygen
leave passphrase empty, just press enter until the key is created
- While still in ssh directory,
cat id_rsa.pub
and copy the entire key
- Go to your Github setting, SSH and add SSH. paste the key in the key field. Give it a proper name and save
- Go back to terminal, setup username and email on git
git config --global user.name "john"
and git config --global user.email "john.doe@gmail.com"
Remember the username and email address muss be the same as the ones used for Github account
- Go back to Github, create a new repository.
- Now go to the folder of your application.
cd /path/of/your/application
and run these command
git init
git add -A
git commit -m "any message e.g. 'my first commit'"
- Add your ssh URL or copy paste from your Github repository page
git remote add origin ssh://login@IP/path/to/repository
git push -u origin master
No comments:
Post a Comment