Dheeraj26-02/Git_Tutorial
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
git remote add origin url-name --> connect repo with vscode
git remote -v -->verify remote
git branch -->to check branch
git branch -M main --> renaming default branch as main
git add . --> adding file
git commit -m "comment" -->commit all files(green)
git status -->checking commited file
git push -u origin main -->pushing to remote repo(next push--> git push)
git checkout -b branch-name -->to create new branch
git branch -d branch-name -->to delete branch
git diff branch-name --> to compare two branches
git pull origin branch-name -->pulling from remote repo
git merge branch-name -->merge two branches if there is no conflicts(change in same line)
git reset file-name --> undo last commit
git reset head~1 --> commit goes back one step
git reset commit-hash --> go back to specific commit
git reset --hard commit-hash --> changes are done vscode also
git clone -->copying repo