File tree Expand file tree Collapse file tree 2 files changed +21
-5
lines changed Expand file tree Collapse file tree 2 files changed +21
-5
lines changed Original file line number Diff line number Diff line change 14
14
* [ Track upstream branch] ( https://github.com/git-tips/tips#Track-upstream-branch )
15
15
* [ Delete local branch] ( https://github.com/git-tips/tips#Delete-local-branch )
16
16
* [ Delete remote branch] ( https://github.com/git-tips/tips#Delete-remote-branch )
17
+ * [ Undo local changes with the last content in head] ( https://github.com/git-tips/tips#Undo-local-changes-with-the-last-content-in-head )
18
+ * [ Changing a remote's URL] ( https://github.com/git-tips/tips#Changing-a-remotes-URL )
17
19
18
20
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
19
21
<!-- @doxie.inject end toc -->
@@ -68,12 +70,22 @@ git branch -u origin/mybranch
68
70
69
71
## Delete local branch
70
72
``` sh
71
- git branch -d local_branchname
73
+ git branch -d < local_branchname>
72
74
```
73
75
74
76
## Delete remote branch
75
77
``` sh
76
- git push origin :remote_branchname
78
+ git push origin :< remote_branchname>
79
+ ```
80
+
81
+ ## Undo local changes with the last content in head
82
+ ``` sh
83
+ git checkout -- < file_name>
84
+ ```
85
+
86
+ ## Changing a remote's URL
87
+ ``` sh
88
+ git remote set-url origin < URL>
77
89
```
78
90
79
91
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
Original file line number Diff line number Diff line change 37
37
},
38
38
{
39
39
"title" : " Delete local branch" ,
40
- "tip" : " git branch -d local_branchname"
40
+ "tip" : " git branch -d < local_branchname> "
41
41
},
42
42
{
43
43
"title" : " Delete remote branch" ,
44
- "tip" : " git push origin :remote_branchname"
44
+ "tip" : " git push origin :< remote_branchname> "
45
45
},
46
46
{
47
47
"title" : " Undo local changes with the last content in head" ,
48
- "tip" : " git checkout -- file_name"
48
+ "tip" : " git checkout -- <file_name>"
49
+ },
50
+ {
51
+ "title" : " Changing a remote's URL" ,
52
+ "tip" : " git remote set-url origin <URL>"
49
53
}
50
54
]
You can’t perform that action at this time.
0 commit comments