silky1708 / branching-and-merging

practiced branching and merging

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

git cheatsheet for branching and merging

To create and switch to a new branch :-

git checkout -b <branch name>

To switch to a branch that already exists :-

git checkout <branch name>

To delete a branch :-

git branch -d <branch name>

To merge a branch with the current branch :-

git merge <branch to be merged>

To print all the active branches :-

git branch

To push the current branch changes :-

git push <remote> <branch name>

To rename a branch :-

git branch -m <old name> <new name>

To delete a remote branch :-

git push -d <remote> <branch to be deleted>

About

practiced branching and merging