https://github.com/imphaniraj/learning-git
Basic github exercise
https://github.com/imphaniraj/learning-git
git github
Last synced: 6 months ago
JSON representation
Basic github exercise
- Host: GitHub
- URL: https://github.com/imphaniraj/learning-git
- Owner: Imphaniraj
- Created: 2022-06-02T08:30:46.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-05-22T08:51:10.000Z (about 3 years ago)
- Last Synced: 2024-06-19T18:04:25.267Z (about 2 years ago)
- Topics: git, github
- Language: HTML
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# learning-git
Starting lesons of git which includes
1. git add -A // to add all the untracked/tracked files into staging area
2. git commit -sm "" // -sm is to signoff and move the staging files into committed area
3. git restore // restores a file or folder to a specific commit
4. git push remote branch // pushes code to the github from local
5. git pull remote branch // pull the code from github to local
6. git add remote git@hostname // linking your local folder with the apt github account
7. git branch // only create bracnh
8. git checkout // only checkout
9. git checkout -b branchname // "to create and checkout"
10. git branch -d branchname // "to delete the branch"
11. git rebase
12. git stash save / pop / apply / list and others // commands related to stash
13. git log --oneline (--color --graph --decorate) // to show logs in one line (along with the journey oif respective branches merged into main branch)
14. git rebase -i // interaitve editor will open to group the commits, you cna even squash the more than one commits into one. This helps to make the merge linear.
[GIT even allows you to configure whenewver you merge, it automatically gets squashed and merged]