Git
Git Tutorial for Beginners with Examples
Install Git
Add Local Project to Remote Git Repository
How to Clone a Project from a Remote Git Repository
Create a New Branch in Git
Switching Branches in Git
How to Push Code from Local to Remote Repository
Pushing a New Local Branch to a Remote Git Repository
Deleting a Git Branch Both Locally and Remotely
Restoring a Deleted Git Branch
Switching to a Different Branch Without Committing Changes in Local Git Repository
Git Stash Revert: How to Restore Stashed Changes in Git
Creating a Git Pull Request
Cancel a Git Pull Request
Tags in Git
Git Commands for Beginners
Generating a Personal Access Token on GitHub
Update the Local Branch with the Latest Code Changes from the Remote Branch
Compare Two different Git Branches in Visual Studio Code
Git Commands for Beginners
- Last updated Apr 25, 2024
Here is a list of Git commands that every beginner should know:
- To change a directory into a Git repository:
git init
git clone <remote_repository_url>
git checkout <branch_name>
git branch <branch_name>
git checkout -b <new_branch_name>
git branch -m <branch_old_name> <branch_new_name>
git add <file>
git add .
git commit -m 'commit message here'
git push origin <branch_name>
git pull origin <branch_name>
git branch -D <branch_name>
git push -d origin <branch_name>
git reset HEAD <file>
git stash
git stash pop
git status
git branch -a
git merge <another_branch_name>