Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions content/docs/cli-guides/cli-tutorial/branching-and-commiting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ but status

Now we can commit our unassigned changes to that branch. You can simply assign your changes to the branch first to commit later (we’ll cover that later in [Rubbing](https://www.notion.so/Rubbing-2545a4bfdeac80209d37cd4d629316cc?pvs=21)), but for now let’s keep it simple and just commit them directly using the `but commit` command.

```cli [927c817ed73b68c7, 88px]
```cli [d717a67c1accab44, 88px]
but commit -m 'all the user bookmarks'
```

If you don’t specify the `-m` commit message, GitButler will try to open an editor with a tempfile where you can write a longer commit message. It will use the `$EDITOR` environment variable if it’s set, or the `core.editor` Git or GitButler config setting, or it will prompt you for a command to run if you’re in an interactive terminal.

Now our status looks like this, with all unassigned files in a new commit on our new branch:

```cli [0000fdfa2b5ec92b, 220px]
```cli [bdaa2dcbd8b894ef, 220px]
but status
```

Expand All @@ -98,19 +98,19 @@ but branch new liked-tweets

Now if we run `but status` we can see our previous branch and our new empty branch.

```cli [b5b56bebb89dedc3, 330px]
```cli [29d022b78235e251, 330px]
but status
```

We can see our previous branch and the commit we made, our new empty branch and a couple of modified files. Now we can commit the unassigned changes to that branch with `but commit -m "liked tweets changes" liked-tweets`

```cli [bd4f40610e40f1b5, 88px]
```cli [5d0f6f51e7449095, 88px]
but commit -m "liked tweets changes" liked-tweets
```

And now we have one commit in each lane.

```cli [1eccbe4db529d72f, 308px]
```cli [6656c445d61aa876, 308px]
but status
```

Expand All @@ -120,7 +120,7 @@ If you don’t specify a branch identifier and you have more than one active bra

We can also see which files were modified in each commit with the `--files` or `-f` option to `but status`:

```cli [f3c56e67a1e24971, 484px]
```cli [f808c081358b0b3d, 484px]
but status -f
```

Expand All @@ -143,11 +143,11 @@ but status

Now we can commit to our stacked branch.

```cli [de923765534564a6, 88px]
```cli [d6a4f4f7e6193ab3, 88px]
but commit -m "liked tweets changes" liked-tweets-stacked
```

```cli [9d97a568b3786b14, 286px]
```cli [b3259abf9ec92476, 286px]
but status
```

Expand Down Expand Up @@ -202,23 +202,23 @@ Now, if we want to create a commit in the `user-bookmarks` branch, we can either

Or, we can make a commit with _only_ the assigned files in `user-bookmarks` by using the `-o` option to `but commit`.

```cli [79a511563972cc8f, 88px]
```cli [db9986aeb0ff50fa, 88px]
but commit -o -m "liked tweets view" h4
```

Now if we look at our status we can see a commit on our branch instead of the assigned changes:

```cli [24f5456cca204e8d, 396px]
```cli [fc68154f9c1f9d0a, 396px]
but status
```

Now let's commit all the rest of the changes (assigned and unassigned) to our other branch:

```cli [682139bab4bdc57d, 88px]
```cli [0a82b554b0ccd94a, 88px]
but commit -m 'bookmarks stuff' nd
```

```cli [f93e374ac2785a90, 308px]
```cli [a8645f9c1c4ed254, 308px]
but status
```

Expand Down
4 changes: 2 additions & 2 deletions content/docs/cli-guides/cli-tutorial/operations-log.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ GitButler maintains a detailed log of all operations, making it easy to track wh

See all recent GitButler operations:

```cli [61a4ed332fc62e70, 550px]
```cli [d56ec4583e46b761, 550px]
but oplog
```

## Undoing the last operation

Undo the last operation:

```cli [95763a83f458be55, 132px]
```cli [a5c655fd3216bb9d, 132px]
but undo
```

Expand Down
16 changes: 8 additions & 8 deletions content/docs/cli-guides/cli-tutorial/rubbing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,13 @@ but status -f

So now we can move the changes from one commit to another by rubbing pretty easily. Let’s take the `app/controllers/bookmarks_controller.rb` change and move it down to the "add bookmark model and associations" commit:

```cli [03420f08f4e2df55, 176px]
but rub pm f5
```cli [20c8dd61540479ef, 88px]
but rub vo f5
```

Now the change is in the previous commit:

```cli [2f4817399ff46441, 682px]
```cli [6b84f918aca6eb05, 682px]
but status -f
```

Expand All @@ -167,16 +167,16 @@ but status

Now we want to split the "add bookmark model and associations" into two separate commits. The way we do this is to insert a blank commit in between `06` and `f5` and then rub changes into it (then probably edit the commit message).

We can insert a blank commit by running `but new 06` which inserts a blank commit under the specified commit.
We can insert a blank commit by running `but new f5` which inserts a blank commit under the specified commit.

```cli [711027350744cca1, 88px]
but new 06
```cli [5326a91276d35e82, 88px]
but new f5
```

Now we have a blank commit:

```cli [bfafb0a0ab77bc27, 704px]
```cli [814da470705a208e, 726px]
but status -f
```

Now we can use the previous method of moving file changes from other commits into it, then edit the commit message with `but describe 6w` (for more on the `describe` command, see [Editing Commits](editing-commits), coming up next).
Now we can use the previous method of moving file changes from other commits into it, then edit the commit message with `but describe 54` (for more on the `describe` command, see [Editing Commits](editing-commits), coming up next).
28 changes: 0 additions & 28 deletions public/cache/cli-output/03420f08f4e2df55.html

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</style>
</head>
<body>
<pre>Created commit f35a14a on branch user-bookmarks
<pre>Created commit e36adcf on branch user-bookmarks
</pre>
</body>
</html>
24 changes: 24 additions & 0 deletions public/cache/cli-output/20c8dd61540479ef.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>/usr/local/bin/but rub vo f5</title>
<style>
body {
background-color: #ffffff;
color: #24292e;
font-family: 'Consolas', 'Courier New', monospace;
padding: 20px;
margin: 0;
}
pre {
white-space: pre-wrap;
word-wrap: break-word;
}
</style>
</head>
<body>
<pre>Moved files between commits!
</pre>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
┊ <u><span style='color:var(--blue,#00a)'>ou</span></u> M <span style='color:var(--yellow,#a60)'>app/models/like.rb</span>
┊╭┄<u><span style='color:var(--blue,#00a)'>nd</span></u> [<b><span style='color:var(--green,#0a0)'>user-bookmarks</span></b>]
┊● <u><span style='color:var(--blue,#00a)'>e8</span></u><span style='opacity:0.67'>6dada</span> all the user bookmarks
┊● <u><span style='color:var(--blue,#00a)'>3a</span></u><span style='opacity:0.67'>1658b</span> all the user bookmarks
├╯
┊╭┄<u><span style='color:var(--blue,#00a)'>u1</span></u> [<b><span style='color:var(--green,#0a0)'>liked-tweets</span></b>] <span style='opacity:0.67'><i>(no commits)</i></span>
Expand Down
24 changes: 24 additions & 0 deletions public/cache/cli-output/5326a91276d35e82.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>/usr/local/bin/but new f5</title>
<style>
body {
background-color: #ffffff;
color: #24292e;
font-family: 'Consolas', 'Courier New', monospace;
padding: 20px;
margin: 0;
}
pre {
white-space: pre-wrap;
word-wrap: break-word;
}
</style>
</head>
<body>
<pre>Created blank commit before commit f55a30e
</pre>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</style>
</head>
<body>
<pre>Created commit 65b17f7 on branch liked-tweets
<pre>Created commit 87b1f79 on branch liked-tweets
</pre>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
<pre>╭┄<u><span style='color:var(--blue,#00a)'>00</span></u> [<b><span style='color:var(--green,#0a0)'>Unassigned Changes</span></b>]
┊╭┄<u><span style='color:var(--blue,#00a)'>nd</span></u> [<b><span style='color:var(--green,#0a0)'>user-bookmarks</span></b>]
┊● <u><span style='color:var(--blue,#00a)'>e8</span></u><span style='opacity:0.67'>6dada</span> all the user bookmarks
┊● <u><span style='color:var(--blue,#00a)'>3a</span></u><span style='opacity:0.67'>1658b</span> all the user bookmarks
├╯
┊╭┄<u><span style='color:var(--blue,#00a)'>u1</span></u> [<b><span style='color:var(--green,#0a0)'>liked-tweets</span></b>]
┊● <u><span style='color:var(--blue,#00a)'>65</span></u><span style='opacity:0.67'>b17f7</span> liked tweets changes
┊● <u><span style='color:var(--blue,#00a)'>87</span></u><span style='opacity:0.67'>b1f79</span> liked tweets changes
├╯
<span style='color:var(--magenta,#a0a)'>●</span> <span style='opacity:0.67'>204e309</span> (common base) [<b><span style='color:var(--green,#0a0)'>origin/main</span></b>] Merge pull request #10 from schacon/sc-description
Expand Down
51 changes: 51 additions & 0 deletions public/cache/cli-output/6b84f918aca6eb05.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>/usr/local/bin/but status -f</title>
<style>
body {
background-color: #ffffff;
color: #24292e;
font-family: 'Consolas', 'Courier New', monospace;
padding: 20px;
margin: 0;
}
pre {
white-space: pre-wrap;
word-wrap: break-word;
}
</style>
</head>
<body>
<pre>╭┄<u><span style='color:var(--blue,#00a)'>00</span></u> [<b><span style='color:var(--green,#0a0)'>Unassigned Changes</span></b>]
┊ <u><span style='color:var(--blue,#00a)'>te</span></u> A <span style='color:var(--green,#0a0)'>README.new.md</span>
┊╭┄<u><span style='color:var(--blue,#00a)'>t5</span></u> [<b><span style='color:var(--green,#0a0)'>gemfile-fixes</span></b>]
┊● <u><span style='color:var(--blue,#00a)'>f6</span></u><span style='opacity:0.67'>532f9</span> just the one
┊│ <u><span style='color:var(--blue,#00a)'>p5</span></u> M <span style='color:var(--yellow,#a60)'>app/models/user.rb</span>
┊│ <u><span style='color:var(--blue,#00a)'>oq</span></u> A <span style='color:var(--green,#0a0)'>app/views/bookmarks/index.html.erb</span>
┊│
┊├┄<u><span style='color:var(--blue,#00a)'>qz</span></u> [<b><span style='color:var(--green,#0a0)'>feature-bookmarks</span></b>]
┊<span style='color:var(--magenta,#a0a)'>●</span> <u><span style='color:var(--blue,#00a)'>22</span></u><span style='opacity:0.67'>3fdd6</span> feat: Add bookmarks table to store user-tweet rela
┊│ <u><span style='color:var(--blue,#00a)'>wj</span></u> A <span style='color:var(--green,#0a0)'>app/models/bookmark.rb</span>
┊│ <u><span style='color:var(--blue,#00a)'>i0</span></u> M <span style='color:var(--yellow,#a60)'>config/routes.rb</span>
┊│ <u><span style='color:var(--blue,#00a)'>hq</span></u> A <span style='color:var(--green,#0a0)'>spacer.txt</span>
┊│ <u><span style='color:var(--blue,#00a)'>ww</span></u> A <span style='color:var(--green,#0a0)'>testing.md</span>
├╯
┊╭┄<u><span style='color:var(--blue,#00a)'>q6</span></u> [<b><span style='color:var(--green,#0a0)'>sc-branch-26</span></b>]
┊● <u><span style='color:var(--blue,#00a)'>47</span></u><span style='opacity:0.67'>4f1fb</span> Add Spanish README and bookmarks feature
┊│ <u><span style='color:var(--blue,#00a)'>yz</span></u> M <span style='color:var(--yellow,#a60)'>Gemfile</span>
┊│ <u><span style='color:var(--blue,#00a)'>tm</span></u> A <span style='color:var(--green,#0a0)'>README-es.md</span>
┊│ <u><span style='color:var(--blue,#00a)'>tq</span></u> M <span style='color:var(--yellow,#a60)'>app/views/dashboard/index.html.erb</span>
┊● <u><span style='color:var(--blue,#00a)'>48</span></u><span style='opacity:0.67'>bb228</span> add bookmark model and associations
┊│ <u><span style='color:var(--blue,#00a)'>ud</span></u> A <span style='color:var(--green,#0a0)'>app/controllers/bookmarks_controller.rb</span>
┊│ <u><span style='color:var(--blue,#00a)'>sg</span></u> M <span style='color:var(--yellow,#a60)'>app/models/tweet.rb</span>
┊│ <u><span style='color:var(--blue,#00a)'>sx</span></u> A <span style='color:var(--green,#0a0)'>db/migrate/20250925000001_create_bookmarks.rb</span>
├╯
<span style='color:var(--magenta,#a0a)'>●</span> <span style='opacity:0.67'>204e309</span> (common base) [<b><span style='color:var(--green,#0a0)'>origin/main</span></b>] Merge pull request #10 from schacon/sc-description
</pre>
</body>
</html>
24 changes: 0 additions & 24 deletions public/cache/cli-output/711027350744cca1.html

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
├╯
┊╭┄<u><span style='color:var(--blue,#00a)'>q6</span></u> [<b><span style='color:var(--green,#0a0)'>sc-branch-26</span></b>]
┊● <u><span style='color:var(--blue,#00a)'>54</span></u><span style='opacity:0.67'>e8cde</span> <span style='opacity:0.67'><i>(no commit message)</i></span> <span style='opacity:0.67'><i>(no changes)</i></span>
┊● <u><span style='color:var(--blue,#00a)'>f5</span></u><span style='opacity:0.67'>5a30e</span> add bookmark model and associations
┊│ <u><span style='color:var(--blue,#00a)'>ls</span></u> M <span style='color:var(--yellow,#a60)'>app/models/tweet.rb</span>
┊│ <u><span style='color:var(--blue,#00a)'>p0</span></u> A <span style='color:var(--green,#0a0)'>db/migrate/20250925000001_create_bookmarks.rb</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
</head>
<body>
<pre><b><span style='color:var(--blue,#00a)'>Undoing operation...</span></b>
Reverting to: <span style='color:var(--green,#0a0)'>MoveCommit</span> (<span style='opacity:0.67'>2020-10-09 09:06:03</span>)
<b><span style='color:var(--green,#0a0)'>✓</span></b> Undo completed successfully! Restored to snapshot: <u><span style='color:var(--blue,#00a)'>4639f24</span></u><span style='opacity:0.67'><span style='color:var(--blue,#00a)'>5c06c</span></span>
Reverting to: <span style='color:var(--green,#0a0)'>Restored from snapshot</span> (<span style='opacity:0.67'>2020-10-09 09:06:03</span>)
<b><span style='color:var(--green,#0a0)'>✓</span></b> Undo completed successfully! Restored to snapshot: <u><span style='color:var(--blue,#00a)'>1defea8</span></u><span style='opacity:0.67'><span style='color:var(--blue,#00a)'>72de8</span></span>
</pre>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
<pre>╭┄<u><span style='color:var(--blue,#00a)'>00</span></u> [<b><span style='color:var(--green,#0a0)'>Unassigned Changes</span></b>]
┊╭┄<u><span style='color:var(--blue,#00a)'>nd</span></u> [<b><span style='color:var(--green,#0a0)'>user-bookmarks</span></b>]
┊● <u><span style='color:var(--blue,#00a)'>f3</span></u><span style='opacity:0.67'>5a14a</span> bookmarks stuff
┊● <u><span style='color:var(--blue,#00a)'>e3</span></u><span style='opacity:0.67'>6adcf</span> bookmarks stuff
├╯
┊╭┄<u><span style='color:var(--blue,#00a)'>h4</span></u> [<b><span style='color:var(--green,#0a0)'>user-changes</span></b>]
┊● <u><span style='color:var(--blue,#00a)'>90</span></u><span style='opacity:0.67'>a2ab2</span> liked tweets view
┊● <u><span style='color:var(--blue,#00a)'>d9</span></u><span style='opacity:0.67'>d0b94</span> liked tweets view
├╯
<span style='color:var(--magenta,#a0a)'>●</span> <span style='opacity:0.67'>204e309</span> (common base) [<b><span style='color:var(--green,#0a0)'>origin/main</span></b>] Merge pull request #10 from schacon/sc-description
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<pre>╭┄<u><span style='color:var(--blue,#00a)'>00</span></u> [<b><span style='color:var(--green,#0a0)'>Unassigned Changes</span></b>]
┊╭┄<u><span style='color:var(--blue,#00a)'>kq</span></u> [<b><span style='color:var(--green,#0a0)'>liked-tweets-stacked</span></b>]
┊● <u><span style='color:var(--blue,#00a)'>59</span></u><span style='opacity:0.67'>db960</span> liked tweets changes
┊● <u><span style='color:var(--blue,#00a)'>71</span></u><span style='opacity:0.67'>f4fe2</span> liked tweets changes
┊│
┊├┄<u><span style='color:var(--blue,#00a)'>nd</span></u> [<b><span style='color:var(--green,#0a0)'>user-bookmarks</span></b>]
┊● <u><span style='color:var(--blue,#00a)'>e6</span></u><span style='opacity:0.67'>77a2e</span> user bookmarks feature
Expand Down
Loading