Git Basic Command List

Serial Git Command Description Tags
1 git init Initialize git repository in a folder init,start git,open git
2 git status Information about changed/deleted files status,condition,changes,modify
3 git config username.name="Jhon" Config git user for the current git git, config, user,name
4 git config username.email="jhon@gmail.com" Config git email for the current git git, config, user,email
5 git config --global username.name="Jhon" Config git user for the current git globally in a machine setup,config, globally, user,name
6 git config --global username.email="jd@gmail.com" Config git email for the current git globally in a machine setup,config, globally, user,email
7 git remote add origin https://github.com/arif98741/gitcom Config remote connection for uploading files and data to the repository(such as github, gitlab, bitbucket, sourceforge) setup,origin,remote,server,repo
8 git -v Current installed git version git,version,show
9 git add file.txt Add specific file for commit add, fixed, specific, custom file
10 git add   . Add all changed file for commit add, all, every file, changed
11 git commit -m "commit message" Commit Changes with messages and information commit, change, -m
12 git branch See all branch list branch, list, local
13 git branch branch_name Create new branch locally branch, change, make, create
14 git checkout -b branch_name Create new branch and move to there create, move, branch, checkout
15 git checkout -b branch_name
or
git push origin branch_name
Create new branch locally and push it to origin branch, change, make, create
16 git checkout dev Migrate from any branch to dev create, move, branch, checkout
17 git push Push current changed commits to current branch where you are push, commit, master
18 git push -u origin master Push current changed commits to master branch push, commit, change,master
19 git push -u origin branch_name Push current changed commits to specific branch specific,fixpush,branch,commit, change,master
20 git log show all commits with details git,log, change, commit,all
21 git log --oneline show all commits with summary log,change,commit,summary
22 git rev-list --all show all commits with commit long id git,log, change, commit,all
23 git rev-list --all --count Show number of commits count, number, how many, log
24 git shortlog Show number of commits with summary log,number,commit,list
25 git shortlog -s Show number of commits per user user,commit,change,log,list,count,number
26 git pull update local branch by fetching data from remote origin pull, update,remote ,origin
27 git tag Show all local tag list tag, list, all, tags
28 git ls-remote --tags origin Show all remote tag list tag, list,remote, origin, all, tags
29 git tag tag_name Create a new tag locally tag, create, new, local
30 git checkout tags/tagname Checkout to new tag tag, checkout, new,
31 git tag tag_name -a
or
git push origin --tags
Create a local tag and upload to origin origin, tag, remote
32 git push --tags Push all tags to the remote push, tag, all, --tags
33 git tag tag_name -a Create a new tag with nesscessary description -a, tag,create, make
34 git tag -d tag_name Delete local tag tag,delete,clear, local
35 git push origin :tagname
or
git push --delete origin tagname
or
git push origin :refs/tags/tagname
Delete remote tag tag, delete, push, origin
36 git fetch --tags Fetch and update local tags from remote origin tag,fetch,remote,origin
37 git merge feature Merge master branch with feature sub brach master,rebase, feature,sub, child
38 git rebase feature Rebase feature branch with master branch rebase, feature, master, merge, change