Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sumitesh9/git-demo
https://github.com/sumitesh9/git-demo
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/sumitesh9/git-demo
- Owner: sumitesh9
- Created: 2021-06-14T09:07:29.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-06-14T10:54:02.000Z (over 3 years ago)
- Last Synced: 2024-09-16T06:54:32.273Z (3 months ago)
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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