Commands | Description |
---|---|
git branch |
List of branches (the asterisk indicates the present working branch) |
git branch -a |
List all branches (local and remote) |
git branch [Branch_name] |
To create a new branch |
git branch -d [Branch_name] |
Delete a branch |
git push origin --delete [branch name] |
Delete a remote branch |
git checkout -b [Branch_name] |
Create a new branch and switch to it |
git checkout -b [Branch_name] origin/[branch name] |
Clone a remote branch and switch to it |
git branch -m [Old_branch_name] [new branch name] |
Rename a local branch |
git checkout [Branch_name] |
Switch to a branch |
git checkout - |
Switch to the branch last checked out |
git checkout -- [file_name.md/css/html/js/text] |
Discard changes to a file |
git merge [Branch_name] |
Merge a branch into the active branch |
git merge [Source_branch] [target branch] |
Merge a branch into a target branch |
git stash |
Stash changes in a dirty working directory |
git stash clear |
Remove all stashed entries |
-
Notifications
You must be signed in to change notification settings - Fork 0
Here is some usefull Git branching And merging command that you need to know for working in a team project.
developer-shourav/Git-Branching-Marging
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Here is some usefull Git branching And merging command that you need to know for working in a team project.
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published