Skip to content

Instantly share code, notes, and snippets.

@theel0ja
Last active July 21, 2020 22:01
Show Gist options
  • Save theel0ja/a9ea1c276a07585ef8cc119c0106a806 to your computer and use it in GitHub Desktop.
Save theel0ja/a9ea1c276a07585ef8cc119c0106a806 to your computer and use it in GitHub Desktop.
How to use Git
# First, make SSH keys.
ssh-keygen
# Save the SSH keys to ~/.ssh/id_rsa (on Linux) or some other directory
# make .git directory
git init
# add all files, except the files, what are mentioned in .gitignore
git add .
# Make commit
git commit -m "lorem ipsum"
# Add remote
git remote add origin git@github.com:user/repo.git
# Push to master
git push -u origin master
#push
# add all files, except the files, what are mentioned in .gitignore
git add .
# Make commit
git commit -m "lorem ipsum 2"
# Push to master
git push -u origin master
#pull
git pull
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment