Github Notes
Github Notes
TYPES OF STATUS
1) Untracked (git doesn't know about this whole file)
2) Modified
3) Staged (file is ready to be committed)
4) Unmodified (no change)
add command --> git add (file name) --> to bring the file to add stage
*use command [git add .] to add all files
commit command --> git commit-m "message"
push command --> git push origin main --> to push git to GitHub from local machine
to make the repo made on local device to git --> git init
to upload that git into GitHub --> git remote add origin (link of the local repo
made in GitHub)
to check branch --> git branch
to change name of the branch --> git branch -M (new name)
now to push all the codes into the GitHub repo --> git push origin main [git push -
u origin main (the u prevents us from writing origin main again and again and makes
it our default upload region)]
BRANCHES
MERGING