GIT

From Void-Byte
Revision as of 14:27, 27 April 2020 by Bgrambo (talk | contribs) (Created page with "== About == == Command == <h3>Initialize & Show Repository Status</h3> <code>git init</code><br> <code>git status</code><br> <h3>Stage Files to Commit</h3> <code>git add [file...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

About

Command

Initialize & Show Repository Status

git init
git status

Stage Files to Commit

git add [file]
git add [file1] [file2] [file3]
git add . (all files)
git add --all (all files)
git add -A (all files)
git rm --cached [file] (removes staged filed)
git reset [file]

Commit Files to Repository

git commit -m ["comment"]
git reset --soft HEAD^ (reset the committed head)
git commit --amend -m ["comment"]

Push & Pull From a Repository

git remote add origin [destination]
git push -u origin [destination]
git clone [link]
git pull

Example