git init echo "# MESSAGE" >> README.md git add README.md git commit -m "first commit"
git remote add origin email@example.com:User/UserRepo.git
git remote set-url origin firstname.lastname@example.org:User/UserRepo.git
git push -u origin master
push your code to the
master branch of the remote repository defined with
-u let you point your current local branch to the remote
git add .
add all the changes/modifications to staging area
git commit -m"your comment" will commit the changes with your comment
git push master origin
git push is used to push local commited changes to master branch of origin
git pull is used to sync down changes to local git repo
git clone URL is used to clone/download git repo to local
git config --global http.proxy http://username:password@ipaddress:port
Download and install the Git command line extension. You only have to set up Git LFS once.
git lfs install
Select the file types you’d like Git LFS to manage (or directly edit your .gitattributes). You can configure additional file extensions at anytime.
git lfs track "*.psd"
Make sure .gitattributes is tracked
git add .gitattributes git large files
git reset HEAD \* git checkout -- .
git reset git checkout . git clean -fdx
Open Git Bash. Paste the text below, substituting in your GitHub email address.
ssh-keygen -t rsa -b 4096 -C "email@example.com"
This creates a new ssh key, using the provided email as a label.
Generating public/private rsa key pair.
When you’re prompted to “Enter a file in which to save the key,”
[press Enter]. This accepts the default file location.
Enter a file in which to save the key (/c/Users/you/.ssh/id_rsa):
At the prompt, type a secure passphrase. For more information, see “Working with SSH key passphrases”.
Enter passphrase (empty for no passphrase): [Type a passphrase]
Enter same passphrase again: [Type passphrase again]
eval $(ssh-agent -s)
clip < ~/.ssh/id_rsa.pub
Now the generated ssh key is on the clipboard paste it on the https://github.com/settings/keys