-
Notifications
You must be signed in to change notification settings - Fork 1
Git commands
Rachel Jia edited this page Sep 28, 2017
·
11 revisions
- git clone
- git add .
- git commit --allow-empty-message -m ''
- git push
- git pull
- git add --help
-
git remote add origin remote repository URL
-
# Sets the new remote
-
git remote -v
-
# Verifies the new remote URL
-
git push origin master
-
# Pushes the changes in your local repository up to the remote repository you specified as the origin
[cd into the root of your project]
- git init
- ls -la
- git status
- git add .
- git status
- git commit -m "a useful commit message"
- git status
[change some files in your working area]
- git status
- git diff
- git commit -a -m "commit message. -a adds all files to the index"
- git status
[delete some files from your local working area]
- git status
- git add -u
- git commit -m "commit message. -u adds deleted files to the index"
- git status