Skip to content

Instantly share code, notes, and snippets.

@dvdopi
Created April 24, 2020 06:44
Show Gist options
  • Save dvdopi/011a5c6aa8725a5b5d6a402395391d1e to your computer and use it in GitHub Desktop.
Save dvdopi/011a5c6aa8725a5b5d6a402395391d1e to your computer and use it in GitHub Desktop.
Get statred with git
##Git global setup
git config --global user.name "Yourname"
git config --global user.email "email"
##Create a new repository
git clone <httpslink>
cd directory
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master
##Existing folder
cd existing_folder
git init
git remote add origin <httpslink>
git add .
git commit
git push -u origin master
##Existing Git repository
cd existing_repo
git remote add origin <httpslink>
git push -u origin --all
git push -u origin --tags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment