From c2014afdfa8d6381abd7c1bd2dbda1efd7339dce Mon Sep 17 00:00:00 2001 From: Chandra Mohan Jha Date: Tue, 31 Dec 2019 16:29:02 +0530 Subject: [PATCH] update git.md --- git.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/git.md b/git.md index 26e25ef..aeb091c 100644 --- a/git.md +++ b/git.md @@ -1,14 +1,33 @@ # Git -` git init ` Initialize git +` git init ` Initialize git + ` git status ` Get status + ` git add ` add file to version control + ` git add . ` add all files to version control + ` git commit [-m "commit message"] ` commit the changes to version control + ` git log ` get the log related to git i.e. version committed + +` git reflog ` lists all the log + ` git branch ` get the branches present locally + +` git checkout ` checkout/reset the file + ` git checkout ` checkout the branch + ` git checkout -b ` create a new branch and check it out + ` git merge ` merges the source branch into currently checked out branch + ` git remote add origin ` add remote repo uri + ` git remote -v ` lists the remote URIs + +` git diff ` list all the changes + +` git reset [/] ` reset the current status to given snapshot