Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sumitesh9/git-demo


https://github.com/sumitesh9/git-demo

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

### Git commands and their explanation

1. `git clone` - Clone a repository to local machine
1. `git init` - Initialise a git repository
1. `git status` - Check status of the repository
1. `git checkout -b branchname` - Create a new branch
1. `git add filename` - Add a file to staging area
1. `git add .` - Add all files to staging area
1. `git commit -m Message` - Save the changes made
1. `git merge branchName` - Merge current active branch to branchName
1. `git push origin branchName` - Push to remote repository
1. `git pull` - Pull from remote repository to local repository
1. `git log` - View the commit history
1. `git rm` - Remove files from staging area
1. `git tag commitID` - Give tag to commitID
1. `git remove add variableName RemoteServerURL` - Connect local repository to remote server
1. `git remote add origin url` - Adds remote origin to local repo
1. `git diff commitId1 commitId2` - Compare both the commits
1. `git show commitID` - Shows metadata and changes in the commit