Skip to content

Instantly share code, notes, and snippets.

@Ehsan-Yaghoubi
Forked from pcpsant/instructions.txt
Created October 17, 2019 15:54
Show Gist options
  • Save Ehsan-Yaghoubi/b9ba70341d2374f0d206954245e5b85c to your computer and use it in GitHub Desktop.
Save Ehsan-Yaghoubi/b9ba70341d2374f0d206954245e5b85c to your computer and use it in GitHub Desktop.
Command Line Git QuickStart
With normal user:
If repository is empty.
$ mkdir REPO
$ cd REPO
$ touch README.md
$ git init
$ git add README.md
$ git commit -m "Message to be public displayed"
$ git remote add origin [email protected]:USER/REPO.git
$ git push -u origin master
If repository has files
$ git clone [email protected]:USER/REPO.git
$ git add README.md
$ git commit -m "Message to be public displayed"
$ git push -u origin master
WARNING: this is important and should be set in the machines
git config --global user.email "[email protected]"
git config --global user.name "My Name"
To verify the changes use the same commands as above without the values:
git config --global user.email
git config --global user.name
To erase the previous configs:
git config --global --unset user.email
git config --global --unset user.name
git rm file1 file2 ... fileN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment