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

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

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