File tree Expand file tree Collapse file tree 2 files changed +36
-1
lines changed Expand file tree Collapse file tree 2 files changed +36
-1
lines changed Original file line number Diff line number Diff line change @@ -322,6 +322,21 @@ <h4>
322322 switch to it so your class renaming changes are isolated. We're going to
323323 change each instance of 'HelloWorld' to 'HiWorld'.</ p >
324324
325+ < h4 >
326+ git branch -v
327+ < small > see the last commit on each branch</ small >
328+ </ h4 >
329+
330+ < p > If we want to see last commits on each branch
331+ we can run < code > git branch -v</ code > to see them.</ p >
332+
333+ < pre >
334+ < b > $ git branch -v</ b >
335+ * < span class ="green "> master</ span > 54b417d fix javascript issue
336+ development 74c111d modify component.json file
337+ testing 62a557a update test scripts
338+ </ pre >
339+
325340< pre >
326341< b > $ git checkout -b change_class</ b >
327342Switched to a new branch 'change_class'
Original file line number Diff line number Diff line change @@ -144,13 +144,33 @@ <h4>
144144< b > $ git remote -v</ b >
145145github git@github.com:schacon/hw.git (fetch)
146146github git@github.com:schacon/hw.git (push)
147+ </ pre >
148+
149+ < h4 >
150+ git remote rename [old-alias] [new-alias]
151+ < small > rename remote aliases</ small >
152+ </ h4 >
153+
154+ < p > If you want to rename remote aliases without having to delete them and add them again
155+ you can do that by running < code > git remote rename [old-alias] [new-alias]</ code > . This will
156+ allow you to modify the current name of the remote.</ p >
157+
158+ < pre >
159+ < b > $ git remote add github git@github.com:schacon/hw.git</ b >
160+ < b > $ git remote -v</ b >
161+ github git@github.com:schacon/hw.git (fetch)
162+ github git@github.com:schacon/hw.git (push)
163+ < b > $ git remote rename github origin</ b >
164+ < b > $ git remote -v</ b >
165+ origin git@github.com:schacon/hw.git (fetch)
166+ origin git@github.com:schacon/hw.git (push)
147167</ pre >
148168
149169 < p class ="nutshell ">
150170 < b > In a nutshell</ b > with < code > git remote</ code > you can list our
151171 remote repositories and whatever URL
152172 that repository is using. You can use < code > git remote add</ code > to
153- add new remotes and < code > git remote rm</ code > to delete existing ones.
173+ add new remotes, < code > git remote rm</ code > to delete existing ones or < code > git remote rename [old-alias] [new-alias] </ code > to rename them .
154174 </ p >
155175
156176 < h4 >
You can’t perform that action at this time.
0 commit comments