https://github.com/karan-develops/karan-demo
This is my first git Repository
https://github.com/karan-develops/karan-demo
Last synced: 3 months ago
JSON representation
This is my first git Repository
- Host: GitHub
- URL: https://github.com/karan-develops/karan-demo
- Owner: Karan-develops
- Created: 2024-01-30T16:27:19.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-26T12:24:45.000Z (about 1 year ago)
- Last Synced: 2024-03-26T13:37:06.250Z (about 1 year ago)
- Language: HTML
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# karan-demo
I MADE THIS REPO FOR BASIC COMMANDS FOR BEGINNERS FOR GITHUB
Author -> Karan aggarwal :)
// Commands (ls, ls -a)
cd karan-demo -> change directory to karan-demo
git status , git clone , git add . , git add , git commit -m ""
git push origin main -> make changes (from local to remote repo)
//init (used to create new repo -> from device to git)
to get outside of the directory -> cd ..
create new repo directory -> mkdir
to make a repo into a git repo -> git init//creating new repo from local to remote
git remote add origin
to verify remote -> git remote -v
to check branch -> git branch
to rename branch -> git branch -M main
git push origin main
set upstream (if we don't wanna write origin main again n again) -> git push -u origin main//branches
to check branch -> git branch
to rename branch -> git branch -M main
to navigate(jump) between branches -> git checkout
to make new branchs -> git checkout -b
to delete a branch -> git branch -d//merging (way1)
to compare 2 branches,commits,files,etc -> git diff
to merge 2 branches -> git merge
(way2) -> create a PR (pull request)//pull command
to pull changes from remote(git) to local -> git pull origin main//Undoing changes
to undo add changes -> git reset
to undo commit changes (for 1 commit) -> git reset HEAD~1
**
//git log (to see commit changes history)
to undo multiple commit changes -> git reset (obtain from git log)
git reset --hard (vs code se bhi changes ht jaenge)//fork -> a rough copy of others code in our repo