-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
branch rename: Support <old> <new> form (#139)
With this, 'branch rename' supports the following three forms: branch rename <old> <new> branch rename <new> # old = current branch rename # old = current, new = prompt
- Loading branch information
Showing
4 changed files
with
75 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
kind: Added | ||
body: 'branch rename: Support renaming another branch by name with the `branch rename <old> <new>` form of the command.' | ||
time: 2024-06-01T12:22:30.93713-07:00 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Renaming a branch by name. | ||
|
||
as 'Test <[email protected]>' | ||
at '2024-06-01T12:15:12Z' | ||
|
||
mkdir repo | ||
cd repo | ||
git init | ||
git commit --allow-empty -m 'Initial commit' | ||
gs repo init | ||
|
||
git add foo.txt | ||
gs branch create oldname -m 'Do things' | ||
gs trunk | ||
|
||
gs branch rename oldname newname | ||
git graph --branches | ||
cmp stdout $WORK/golden/graph.txt | ||
|
||
|
||
-- repo/foo.txt -- | ||
whatever | ||
|
||
-- golden/graph.txt -- | ||
* 1f8dc81 (newname) Do things | ||
* 0cfef96 (HEAD -> main) Initial commit |