Created
July 10, 2012 15:02
-
-
Save pcpsant/3083873 to your computer and use it in GitHub Desktop.
Command Line Git QuickStart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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