https://github.com/rajkumar060301/git-command-cheatseets
This repo is descrive the command line for git and github handling
https://github.com/rajkumar060301/git-command-cheatseets
git github
Last synced: 2 months ago
JSON representation
This repo is descrive the command line for git and github handling
- Host: GitHub
- URL: https://github.com/rajkumar060301/git-command-cheatseets
- Owner: rajkumar060301
- Created: 2024-05-31T16:57:30.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-31T16:59:09.000Z (about 2 years ago)
- Last Synced: 2025-10-29T14:31:25.821Z (8 months ago)
- Topics: git, github
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# git-command-cheatseets
1. Set the user name
git config --global user.name "Your Name"
2. Set the user email
git config --global user.email "your.email@example.com"
3. Check the user name
git config --global user.name
4. check the user email
git config --global user.email
5. Check the git version
git --version
6. check current branch
git branch --show-current
git status
7. check the all branch
git branch -a
8. check the remote version
git remote -v
9. rename the remote orgin
git remote rename origin newname
10. how to commit
git commit -m "Your commit message"
11. how to add signle file for commit
git add filename
12. how to add all file for commit
git add .
13. how create new branch
git branch new-branch-name
14. how to change branch
git checkout branch-name
git switch branch-name
15. how to copy one branch to another branch
git checkout -b new-branch-name source-branch-name
git switch -c new-branch-name source-branch-name
16.How to merge code
git checkout target-branch
git merge source-branch
git checkout main
git merge feature-branch
17. How to set git repo to change or rename current repo
git remote set-url origin reponame