Git & GitHub
Git & GitHub
Git & GitHub
Git Commands
git init .
git add <file name>
git commit -m "Commit information"
git status
git log
git remote add "remote_repo" // add remote repo to local system
git clone <remote_repo> // clone repo into local system
git pull origin master
git push origin master
git checkout --
git checkout -- .
git restore <file_name>
git restore .
git checkout <branch_name>
git checkout <commit_id> file // to get a file from previous commit
git annotate <file-name>
git branch --set-upstream-to=origin/master master
git reset HEAD~N (N is number of commits to revert) //revert commits on local repository
git checkout <branch_name>
git checkout HEAD~1