DEV Community

Cover image for List of Github Commands
Chetan Rohilla
Chetan Rohilla

Posted on • Updated on • Originally published at w3courses.org

List of Github Commands

GitHub is a code management, code hosting platform for version control and collaboration. It lets you and your team work together on projects from anywhere. Here is a list of github commands which you can use to manage your code and repositories.

git config –global user.name “[firstname lastname]”

git config –global user.email “[valid-email]”

git config –global color.ui auto

git init

git clone [url]

git status

git add [file]

git reset [file]

git diff

git diff –staged

git commit -m “[descriptive message]”

git branch

git branch [branch-name]

git checkout

git merge [branch]

git log

git log branchB..branchA

git log –follow [file]

git diff branchB…branchA

git show [SHA]

git rm [file]

git mv [existing-path] [new-path]

git log –stat -M

logs/
.notes
pattern/

git config –global core.excludesfile [file]

git remote add [alias] [url]

git fetch [alias]

git merge [alias]/[branch]

git push [alias] [branch]

git pull

git rebase [branch]

git reset –hard [commit]

git stash

git stash list

git stash pop

git stash drop
Enter fullscreen mode Exit fullscreen mode

Please like share and give positive feedback to motivate me to write more.

For more tutorials visit my website.

Thanks :)
Happy Coding :)

Top comments (2)

Collapse
 
offline profile image
Offline

Great summary! Although Github != git.

Git is an version control system that you can use, it’s an open standard.
Github is an Microsoft online service where you can share you code and versioning of your projects.

Collapse
 
readymadecode profile image
Chetan Rohilla • Edited

Yes, absolutely right. But some peoples uses term github or git. That's why i have used both terms github and git.