mirror of
https://github.com/LeCoupa/awesome-cheatsheets.git
synced 2026-10-29 00:04:06 -07:00
docs(git): rework the way we delete a branch
This commit is contained in:
1 parent
6a18dc96f1
commit
8b1ae69f76
1 file changed
+6
-6
+6
-6
@@ -7,12 +7,12 @@ git reset file.txt # Removes file.txt from the stage
|
|||||||
git rm file.txt # removes file.txt both from git and file system
|
git rm file.txt # removes file.txt both from git and file system
|
||||||
git status # shows the modifications and stuff that are not staged yet
|
git status # shows the modifications and stuff that are not staged yet
|
||||||
|
|
||||||
git branch # shows all the branches (current branch is shown with a star)
|
git branch # shows all the branches (current branch is shown with a star)
|
||||||
git branch my-branch # creates my-branch
|
git branch my-branch # creates my-branch
|
||||||
git branch -d my-branch # deletes my-branch
|
git branch -d my-branch # deletes my-branch
|
||||||
git checkout my-bracnch # switches to my-branch
|
git checkout my-bracnch # switches to my-branch
|
||||||
git merge my-branch # merges my-branch to current branch
|
git merge my-branch # merges my-branch to current branch
|
||||||
git push origin :my-branch # delete remote branch
|
git push origin --delete my-branch # delete remote branch
|
||||||
|
|
||||||
git cherry-pick <commit_id> # merge the specified commit
|
git cherry-pick <commit_id> # merge the specified commit
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user