You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -47,12 +47,12 @@ Stacking and Virtual Branches are similar in that they allow you to separate cod
47
47
the changes are available in your working directory.
48
48
49
49
The main difference is that Virtual Branches are **independent** from one another, while stacked branches **depend** on the ones that come before it.
50
-
Because of this, the two features are not mutually exclusive but rather complementary. For example a bugfix change that is unrelated to a feature
50
+
Because of this, the two features are not mutually exclusive but rather complementary. For example a bugfix change that is unrelated to a feature
51
51
can be put in a separate virtual branch. On the other hand, a change that depends on a previous change can be put in a stacked branch above the one it depends on.
52
52
53
53
In fact GitButler implements stacked branches as Virtual Branches that are split into multiple dependent branches.
3. Pushing is done for the stack as a whole. Note: The Pull Requests will be created in a way where each branch points to its parent - see [Automatic branch deletion](#automatic-branch-deletion)
8. Review/merge your PRs starting from the bottom up. After a PR/branch from your stack has been merged, it is reflected in the Stack and you should force push to reflect the changes
If the newly merged branch from the bottom of the stack is not deleted, the next PR in line will still target it and there is a risk of accidentally merging it into the now out of data branch.
139
139
For this reason it is _highly recommended_ to [enable on GitHub](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-the-automatic-deletion-of-branches) the automatic deletion of branches after merging.
Copy file name to clipboardExpand all lines: content/docs/features/timeline.mdx
+3-3
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ Before GitButler does any major action, it records the state of everything (your
11
11
12
12
<ImageSection
13
13
alt="Virtual Branches Example"
14
-
src="/img/docs/timeline-01.avif"
14
+
src="/timeline-01.png"
15
15
/>
16
16
17
17
@@ -23,14 +23,14 @@ If you hover over any of the entries, you will see a button named "Revert" that
23
23
24
24
<ImageSection
25
25
alt="Virtual Branches Example"
26
-
src="/img/docs/timeline-02.png"
26
+
src="/timeline-02.png"
27
27
/>
28
28
29
29
## Recovering Content
30
30
Occasionally, GitButler will also take snapshots of files that were changed recently, even if they weren't committed. If this, or any other action, sees changes in files, you can see which ones and view the change by clicking on the file name.
Copy file name to clipboardExpand all lines: content/docs/features/virtual-branches/commits.mdx
+10-10
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ If you want AI to use your diff to generate a commit message, you can hit the "G
18
18
19
19
<ImageSection
20
20
alt="Creating Commits Example"
21
-
src="/img/docs/commits-01.gif"
21
+
src="/commits-01.gif"
22
22
/>
23
23
24
24
## AI Commit Message Settings
@@ -29,14 +29,14 @@ For both OpenAI and Anthropic, you can either use your own API key to directly s
29
29
30
30
<ImageSection
31
31
alt="AI Commit Settings"
32
-
src="/img/docs/commits-02.avif"
32
+
src="/commits-02.png"
33
33
/>
34
34
35
35
If you use your own key for OpenAI or Anthropic, you can choose which model you would like us to use.
36
36
37
37
<ImageSection
38
38
alt="AI Commit Settings"
39
-
src="/img/docs/commits-03.avif"
39
+
src="/commits-03.png"
40
40
/>
41
41
42
42
If you don't want to send your diff to another server, you can also use Ollama, which is a local LLM server. With Ollama, you can run nearly any open source large language model ([Llama 3](https://www.ollama.com/library/llama3), [Phi 3](https://www.ollama.com/library/phi3), [Mistral](https://www.ollama.com/library/mistral), [Gemma](https://www.ollama.com/library/gemma), etc) entirely locally.
@@ -45,7 +45,7 @@ With all of these models, you can also customize the prompt if you want somethin
45
45
46
46
<ImageSection
47
47
alt="AI Commit Settings"
48
-
src="/img/docs/commits-04.avif"
48
+
src="/commits-04.png"
49
49
/>
50
50
51
51
Custom prompts can contain three variables which we will replace with the appropriate values. Those include:
@@ -63,7 +63,7 @@ This will both rewrite that commit to include the new changes and also rebase ev
63
63
64
64
<ImageSection
65
65
alt="Absorbing New Work"
66
-
src="/img/docs/commits-05.gif"
66
+
src="/commits-05.gif"
67
67
/>
68
68
69
69
## Undoing Commits
@@ -76,7 +76,7 @@ You can easily undo any commit in your stack by expanding the commit and hitting
76
76
77
77
<ImageSection
78
78
alt="Undoing Commits"
79
-
src="/img/docs/commits-06.gif"
79
+
src="/commits-06.gif"
80
80
/>
81
81
82
82
## Squashing Commits
@@ -85,7 +85,7 @@ Squashing two commits into a single combined commit is also very simple. Just dr
85
85
86
86
<ImageSection
87
87
alt="Squashing Commits"
88
-
src="/img/docs/commits-07.gif"
88
+
src="/commits-07.gif"
89
89
/>
90
90
91
91
## Splitting Commits
@@ -94,7 +94,7 @@ Splitting commits is slightly more complex. GitButler allows you to create an "e
94
94
95
95
<ImageSection
96
96
alt="Splitting Commits"
97
-
src="/img/docs/commits-08.gif"
97
+
src="/commits-08.gif"
98
98
/>
99
99
100
100
You can also notice that I easily edit the commit message by just hitting the "edit message" button.
@@ -105,7 +105,7 @@ You can also arbitrarily change the order of your commits by dragging and droppi
105
105
106
106
<ImageSection
107
107
alt="Moving Commits"
108
-
src="/img/docs/commits-09.gif"
108
+
src="/commits-09.gif"
109
109
/>
110
110
111
111
## Edit Mode
@@ -117,7 +117,7 @@ The screen will go into "Edit mode", indicating that you're in a special state w
117
117
<ImageSection
118
118
subtitle="Editing a commit"
119
119
alt="Editing a commit"
120
-
src="/img/docs/conflicts-edit-mode.png"
120
+
src="/conflicts-edit-mode.png"
121
121
/>
122
122
123
123
Then you can change whatever you want and when you click "Save and exit", it will amend the commit you were editing and rebase anything on top of it.
Copy file name to clipboardExpand all lines: content/docs/features/virtual-branches/merging.mdx
+3-3
Original file line number
Diff line number
Diff line change
@@ -14,23 +14,23 @@ When you go to update from upstream, GitButler will show you all the branches th
14
14
15
15
<ImageSection
16
16
subtitle="One branch has a conflict with the upstream work"
17
-
src="/img/docs/conflicts-incoming.png"
17
+
src="/conflicts-incoming.png"
18
18
alt="Conflicts with commits"
19
19
/>
20
20
21
21
In this case, when you perform the rebase, that branch will then contain "conflicted" commits. They will be marked in the UI as conflicted and you can click on them to get a "resolve conflict" button to start the resolution process.
22
22
23
23
<ImageSection
24
24
subtitle="Resolving a conflict"
25
-
src="/img/docs/conflicts-conflicted.png"
25
+
src="/conflicts-conflicted.png"
26
26
alt="Conflicts with commits"
27
27
/>
28
28
29
29
When you click that, GitButler will remove the other virtual branches and other work from your working directory and check out just this commit with it's conflict markers. It will show you a special "edit mode" screen, where you are directly editing this commit.
Copy file name to clipboardExpand all lines: content/docs/features/virtual-branches/overview.mdx
+6-6
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ Virtual branches are just like normal Git branches, except that you can work on
15
15
16
16
<ImageSection
17
17
alt="Virtual Branches Example"
18
-
src="/img/docs/virtual-branches-01.jpeg"
18
+
src="/virtual-branches-01.jpeg"
19
19
subtitle="An example of working on two branches at the same time, while pending upstream changes wait for you to merge them."
20
20
/>
21
21
@@ -50,18 +50,18 @@ Each time you commit on a virtual branch, GitButler calculates what that branch
50
50
## Applying and Unapplying Branches
51
51
Since there isn't just a single branch you can be on, you don't "switch" branches, which implies replacement. You simply "apply" branches, which takes whatever changes they represent and adds them to your working directory. If you don't want those changes in your working directory anymore, you can "unapply" them, which removes only those changes.
52
52
53
-
<ImageSectionsubtitle="Click 'unapply' for any branch to stash it and remove it's changes from the working directory"src="/img/docs/virtual-branches-02.jpeg"alt="Virtual Branch Apply / Unapply" />
53
+
<ImageSectionsubtitle="Click 'unapply' for any branch to stash it and remove it's changes from the working directory"src="/virtual-branches-02.jpeg"alt="Virtual Branch Apply / Unapply" />
54
54
55
55
To delete a virtual branch, you simply unapply it, then left click on it and choose "delete".
56
56
57
57
## Merging Upstream
58
58
Eventually you will have work merged into the branch you chose as your target branch, which will need to be reconciled with all your virtual branches to keep them up to date with where they will eventually need to merge to.
59
59
60
-
<ImageSectionsubtitle="Click 'Merge into common base' to integrate upstream changes into your virtual branches."src="/img/docs/merge-upstream.png"alt="Branch Commit List" />
60
+
<ImageSectionsubtitle="Click 'Merge into common base' to integrate upstream changes into your virtual branches."src="/merge-upstream.png"alt="Branch Commit List" />
61
61
62
62
Upstream work will automatically be shown in your sidebar in the "Target" section. When you click "Merge into common base" (or the "Update" button next to your "Workspace" section), we will attempt to integrate that work with your existing virtual branches. Each branch, applied or unapplied, will try to be updated with the new work.
63
63
64
-
<ImageSectionsubtitle="Click 'Update workspace' to integrate upstream changes into your virtual branches."src="/img/docs/merge-upstream-incoming.png"alt="Update Workspace" />
64
+
<ImageSectionsubtitle="Click 'Update workspace' to integrate upstream changes into your virtual branches."src="/merge-upstream-incoming.png"alt="Update Workspace" />
65
65
66
66
For each virtual branch you have, we will show you if the incoming upstream work has conflicts with each branch. If there are conflicts, you can choose to stash the branch or go ahead and rebase with conflicts, which you can fix later.
67
67
@@ -72,15 +72,15 @@ If you do rebase work that has conflicts, the commit will be marked as being in
72
72
73
73
<ImageSection
74
74
subtitle="When your commits have conflicts"
75
-
src="/img/docs/conflicts-commits.png"
75
+
src="/conflicts-commits.png"
76
76
alt="Conflicts with commits"
77
77
/>
78
78
79
79
This is different from how you might have dealt with conflicts in Git before. If there is conflicting work in a commit, GitButler will ignore the parts that conflict and keep rebasing. In other words, rebases _always_ work. Then you can focus resolving each conflicted commit, one at a time.
0 commit comments