Sibgat-Ul / git_tutorial

This repo was created to help people understand the various commands of git, and to use them properly. Please feel free to add more commands on readme.md/contribute/pull/push/clone or do whatever you want to do.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Repo Github Tutorial

Clone

Save a repository locally

git clone <repo_id>

Pull

Pull changes made into the repository after cloning.

# Open an existing repository / repository you are working on and enter
git pull

Branch

See all branches

# Add -a flag at the end to see all branches from Local and the remote repo
git branch --list

Open a new branch

git branch <Branch_Name>

Change to new branch

git checkout <Branch_Name>

Incase of Conflicts

Rebase

Rebase = True will change the repo head to the Changes that you have made in your local repo

git pull --rebase=False

Rebase = False will change the repo head to the Changes that you have made in your local repo

git pull --rebase=False
git pull --rebase=interactive

About

This repo was created to help people understand the various commands of git, and to use them properly. Please feel free to add more commands on readme.md/contribute/pull/push/clone or do whatever you want to do.