Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 417 lines (324 sloc) 16.969 kb
343382cd » Marius Vollmer
2008-08-12 Added empty manual.
1 \input texinfo.tex @c -*-texinfo-*-
2 @c %**start of header
3 @setfilename magit.info
4 @settitle Magit User Manual
5 @c %**end of header
6
7 @dircategory Emacs
8 @direntry
067e7156 » Marius Vollmer
2008-08-13 More manual stuff, use "Magit" and "Git" spelling.
9 * Magit: (magit). Using Git from Emacs with Magit.
343382cd » Marius Vollmer
2008-08-12 Added empty manual.
10 @end direntry
11
12 @copying
13 Copyright @copyright{} 2008 Marius Vollmer
14
15 @quotation
16 Permission is granted to copy, distribute and/or modify this document
17 under the terms of the GNU Free Documentation License, Version 1.2 or
18 any later version published by the Free Software Foundation; with no
19 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
ff21f5ab » Marius Vollmer
2008-08-12 Some content for the manual.
20 Texts.
343382cd » Marius Vollmer
2008-08-12 Added empty manual.
21 @end quotation
22 @end copying
23
24 @node Top
ff21f5ab » Marius Vollmer
2008-08-12 Some content for the manual.
25 @top Magit User Manual
343382cd » Marius Vollmer
2008-08-12 Added empty manual.
26
62b5fd8f » Marius Vollmer
2008-08-14 Doc updates.
27 Magit is an interface to the version control system Git, implemented
28 as an extension to Emacs.
343382cd » Marius Vollmer
2008-08-12 Added empty manual.
29
30 @menu
31 * Introduction::
ea626dbb » Marius Vollmer
2008-08-21 Fix two bugs from introducing the item abstraction.
32 * Acknowledgments::
62643f94 » Marius Vollmer
2008-08-13 Chapter renamings.
33 * Status::
c8cdc5ed » Marius Vollmer
2008-08-31 Manual updates.
34 * Staging and Committing::
62643f94 » Marius Vollmer
2008-08-13 Chapter renamings.
35 * History::
c8cdc5ed » Marius Vollmer
2008-08-31 Manual updates.
36 * Reflogs::
a21e998b » Marius Vollmer
2008-08-17 Manual fixes.
37 * Diffing::
e8cc5fdf » Marius Vollmer
2008-08-13 Updated manual menus.
38 * Resetting::
a21e998b » Marius Vollmer
2008-08-17 Manual fixes.
39 * Branching::
40 * Merging::
067e7156 » Marius Vollmer
2008-08-13 More manual stuff, use "Magit" and "Git" spelling.
41 * Rebasing::
2733ae2f » Marius Vollmer
2008-09-11 Document rewriting.
42 * Rewriting::
ff21f5ab » Marius Vollmer
2008-08-12 Some content for the manual.
43 * Pushing and Pulling::
343382cd » Marius Vollmer
2008-08-12 Added empty manual.
44 @end menu
45
46 @node Introduction
47 @chapter Introduction
ff21f5ab » Marius Vollmer
2008-08-12 Some content for the manual.
48
067e7156 » Marius Vollmer
2008-08-13 More manual stuff, use "Magit" and "Git" spelling.
49 With Magit, you can inspect and modify any number of Git repositories.
ff21f5ab » Marius Vollmer
2008-08-12 Some content for the manual.
50 You can review and commit the changes you have made to the tracked
51 files, for example, and you can browse the history of past changes.
c8cdc5ed » Marius Vollmer
2008-08-31 Manual updates.
52 There is also support for cherry picking, reverting, merging and
53 rebasing, and other common Git operations.
ff21f5ab » Marius Vollmer
2008-08-12 Some content for the manual.
54
1017a27b » Marius Vollmer
2008-09-07 Updated manual.
55 Magit is not a complete interface to Git; it just aims to make the
56 most common Git operations convenient. Thus, Magit will likely not
57 save you from learning Git itself.
ff21f5ab » Marius Vollmer
2008-08-12 Some content for the manual.
58
636c6768 » Marius Vollmer
2008-08-14 Manual improvements.
59 This manual provides a tour of all Magit features. It does not give a
067e7156 » Marius Vollmer
2008-08-13 More manual stuff, use "Magit" and "Git" spelling.
60 introduction to version control in general, or to Git in particular.
ff21f5ab » Marius Vollmer
2008-08-12 Some content for the manual.
61
067e7156 » Marius Vollmer
2008-08-13 More manual stuff, use "Magit" and "Git" spelling.
62 The main entry point to Magit is @kbd{M-x magit-status}, which will
63 put you in Magit's status buffer. You will be using it frequently, so
ff21f5ab » Marius Vollmer
2008-08-12 Some content for the manual.
64 it is probably a good idea to bind @code{magit-status} to a key of
65 your choice.
66
6538ce4e » Marius Vollmer
2008-08-17 Manual improvements and updates.
67 In addition to the status buffer, Magit will also create buffers that
68 show lists of commits, buffers with diffs, and other kinds of buffers.
69 All these buffers are in @code{magit-mode} and have the same key
70 bindings. Not all commands make sense in all contexts, but a given
c8cdc5ed » Marius Vollmer
2008-08-31 Manual updates.
71 key will always do the same thing in all Magit buffers.
6538ce4e » Marius Vollmer
2008-08-17 Manual improvements and updates.
72
e110ed05 » Marius Vollmer
2008-08-19 Acknowledgements.
73 @node Acknowledgments
74 @chapter Acknowledgments
75
76 From day one of the first Magit announcement, John Wiegley, Linh Dang,
77 and Christian Neukirchen have contributed fixes, UI improvements, and
78 new features. Thanks!
79
a93f24b1 » Marius Vollmer
2008-08-24 Acknowledge Phil.
80 Phil Hagelberg joined a few days later. Thanks!
81
62643f94 » Marius Vollmer
2008-08-13 Chapter renamings.
82 @node Status
83 @chapter Status
ff21f5ab » Marius Vollmer
2008-08-12 Some content for the manual.
84
067e7156 » Marius Vollmer
2008-08-13 More manual stuff, use "Magit" and "Git" spelling.
85 Running @kbd{M-x magit-status} displays the main interface of Magit,
59aac285 » Marius Vollmer
2008-09-27 Updated manual and TODO.
86 the status buffer. You can have multiple status buffers active at the
87 same time, each associated with its own Git repository.
636c6768 » Marius Vollmer
2008-08-14 Manual improvements.
88
89 You need to explicitly refresh the status buffer when you have made
90 changes to the repository from outside of Emacs. You can type @kbd{g}
91 in the status buffer itself, or just use @kbd{M-x magit-status}
92 instead of @kbd{C-x b} when switching to it. You also need to refresh
93 the status buffer in this way after saving a file in Emacs.
94
95 The header at the top of the status buffer shows a short summary of
96 the repository state: where it is located, which branch is checked
c8cdc5ed » Marius Vollmer
2008-08-31 Manual updates.
97 out, etc. Below the header are a number of sections that show details
822adda3 » Marius Vollmer
2008-08-20 Omit empty sections.
98 about the working tree and the staging area. Only sections that are
99 not empty are shown.
ff21f5ab » Marius Vollmer
2008-08-12 Some content for the manual.
100
c8cdc5ed » Marius Vollmer
2008-08-31 Manual updates.
101 You control how much of a section is visible by moving point to its
102 title and hitting @kbd{TAB}. This will cycle through three visibility
103 states of the section: fully visible, fully hidden (expect for the
1017a27b » Marius Vollmer
2008-09-07 Updated manual.
104 first line), and collapsed, where only the first lines of the children
105 are visible. You can also control the visibility of sub-sections in
106 this way.
107
108 Two section show your local changes. They are explained fully in the
109 next chapter, @ref{Staging and Committing}.
110
111 If the current branch is associated with a remote tracking branch, the
112 status buffer shows the differences between the current branch and the
113 tracking branch. See @ref{Pushing and Pulling} for more information.
c8cdc5ed » Marius Vollmer
2008-08-31 Manual updates.
114
115 Typing a digit in the status buffer will move point to a section
1017a27b » Marius Vollmer
2008-09-07 Updated manual.
116 header: @kbd{1} will move to @emph{Unpulled commits}, @kbd{2} will move
c8cdc5ed » Marius Vollmer
2008-08-31 Manual updates.
117 to @emph{Unstaged changes} or @emph{Changes}, @kbd{3} will move to
118 @emph{Staged changes}, and @kbd{4} will move to @emph{Unpushed
119 commits}. Note that these relations are fixed, @kbd{3} always moves
120 to @emph{Unstaged changes}, not the third visible section.
121
122 @node Staging and Committing
123 @chapter Staging and Committing
124
125 Comitting with Git is conceptually a two step process: first you add
126 the changes you want to commit to a 'staging area', and then you
127 commit them to the repository. This allows you to only commit a
128 subset of your local changes.
129
130 Magit allows you to ignore the staging area if you wish. As long as
131 your staging area is unused, Magit will show your uncomitted changes
132 in a section named @emph{Changes}.
133
134 When the staging area is in use, Magit uses two sections:
135 @emph{Unstaged changes} and @emph{Staged changes}. The @emph{Staged
136 changes} section shows the changes that will be included in the next
137 commit, while the @emph{Unstaged changes} section shows the changes
138 that will be left out.
ff21f5ab » Marius Vollmer
2008-08-12 Some content for the manual.
139
1017a27b » Marius Vollmer
2008-09-07 Updated manual.
140 Untracked files are shown as @emph{New} in the @emph{Changes} or
141 @emph{Unstaged changes} section. You can instruct Git to ignore them
142 by typing @kbd{i}.
ff21f5ab » Marius Vollmer
2008-08-12 Some content for the manual.
143
c8cdc5ed » Marius Vollmer
2008-08-31 Manual updates.
144 You can discard uncommitted changes by moving point into a hunk and
145 typing @kbd{k}.
ff21f5ab » Marius Vollmer
2008-08-12 Some content for the manual.
146
c8cdc5ed » Marius Vollmer
2008-08-31 Manual updates.
147 To move a unstaged hunk into the staging area, move point into the
148 hunk and type @kbd{s}. Likewise, to unstage a hunk, move point into
149 it and type @kbd{u}. If point is in a diff header when you type
150 @kbd{s} or @kbd{u}, all hunks belonging to that diff are moved at the
151 same time. To move all hunks of all diffs into the staging area in
152 one go, type @kbd{S}. To unstage everything, type @kbd{U}.
ff21f5ab » Marius Vollmer
2008-08-12 Some content for the manual.
153
c8cdc5ed » Marius Vollmer
2008-08-31 Manual updates.
154 Before committing, you should write a short description of the
155 changes.
ff21f5ab » Marius Vollmer
2008-08-12 Some content for the manual.
156
157 Type @kbd{c} to pop up a buffer where you can write your change
158 description. Once you are happy with the description, type @kbd{C-c
c8cdc5ed » Marius Vollmer
2008-08-31 Manual updates.
159 C-c} in that buffer to perform the commit. When your stagin area is
160 unused at this point, all your uncommitted changes are committed.
161 When the staging area is in use, only the staged changes are
162 committed.
163
164 You can type @kbd{C-c C-a} in the buffer with the change description
165 toggles a flag that determines whether the next commit will be a
166 @emph{amending} one.
ff21f5ab » Marius Vollmer
2008-08-12 Some content for the manual.
167
6538ce4e » Marius Vollmer
2008-08-17 Manual improvements and updates.
168 Typing @kbd{C} will also pop up the change description buffer, but in
169 addition, it will try to insert a ChangeLog-style entry for the change
170 that point is in.
ff21f5ab » Marius Vollmer
2008-08-12 Some content for the manual.
171
62643f94 » Marius Vollmer
2008-08-13 Chapter renamings.
172 @node History
173 @chapter History
ff21f5ab » Marius Vollmer
2008-08-12 Some content for the manual.
174
6538ce4e » Marius Vollmer
2008-08-17 Manual improvements and updates.
175 To show the repository history of your current head, type @kbd{l}. A
176 new buffer will be shown that displays the history in a terse form.
ff21f5ab » Marius Vollmer
2008-08-12 Some content for the manual.
177 The first paragraph of each commit message is displayed, next to a
178 representation of the relationships between commits.
179
6538ce4e » Marius Vollmer
2008-08-17 Manual improvements and updates.
180 Typing @kbd{L} will ask for the starting and end point of the history.
181 This can be used to show the commits that are in one branch, but not
182 in another, for example.
183
ff21f5ab » Marius Vollmer
2008-08-12 Some content for the manual.
184 You can move point to a commit and then cause various things to happen
6538ce4e » Marius Vollmer
2008-08-17 Manual improvements and updates.
185 with it. (The following commands work in any list of commit, such as
186 the one shown in the @emph{Unpushed commits} section.)
ff21f5ab » Marius Vollmer
2008-08-12 Some content for the manual.
187
c8cdc5ed » Marius Vollmer
2008-08-31 Manual updates.
188 Typing @kbd{RET} will pop up more information about the current commit
189 and move point into the new buffer. Typing @kbd{SPC} and @kbd{DEL}
190 will also show the information, but will scroll the new buffer up or
191 down when typed again.
ff21f5ab » Marius Vollmer
2008-08-12 Some content for the manual.
192
c8cdc5ed » Marius Vollmer
2008-08-31 Manual updates.
193 Typing @kbd{a} will apply the current commit to your current branch.
194 This is useful when you are browsing the history of some other branch
195 and you want to `cherry-pick' some changes from it. A typical
196 situation is applying selected bug fixes from the development version
197 of a program to a release branch. The cherry-picked changes will not
198 be committed automatically; you need to do that explicitly.
199
200 Typing @kbd{A} will cherry-pick the current commit and will also
201 commit the changes automatically when there have not been any
202 conflicts.
ff21f5ab » Marius Vollmer
2008-08-12 Some content for the manual.
203
6538ce4e » Marius Vollmer
2008-08-17 Manual improvements and updates.
204 Typing @kbd{v} will revert the current commit. Thus, it will apply
205 the changes made by that commit in reverse. This is obviously useful
c8cdc5ed » Marius Vollmer
2008-08-31 Manual updates.
206 to cleanly undo changes that turned out to be wrong. As with @kbd{a},
207 you need to commit the changes explicitly.
ff21f5ab » Marius Vollmer
2008-08-12 Some content for the manual.
208
6538ce4e » Marius Vollmer
2008-08-17 Manual improvements and updates.
209 Typing @kbd{=} will show the differences from the current commit to
210 the @dfn{marked} commit.
ff21f5ab » Marius Vollmer
2008-08-12 Some content for the manual.
211
6538ce4e » Marius Vollmer
2008-08-17 Manual improvements and updates.
212 You can mark the current commit by typing @kbd{.}. Some commands,
213 such as @kbd{=}, will use the current commit and the marked commit as
214 implicit arguments. Other commands will offer the marked commit as a
215 default when prompting for their arguments.
ff21f5ab » Marius Vollmer
2008-08-12 Some content for the manual.
216
c8cdc5ed » Marius Vollmer
2008-08-31 Manual updates.
217 @node Reflogs
218 @chapter Reflogs
219
220 You can use @kbd{h} and @kbd{H} to browse your @emph{reflog}, the
221 local history of changes made to your repository heads. Typing
222 @kbd{H} will ask for a head, while @kbd{h} will show the reflog of
223 @code{HEAD}.
224
225 The resulting buffer is just like the buffer produced by @kbd{l} and
226 @kbd{L} that shows the commit history.
227
6538ce4e » Marius Vollmer
2008-08-17 Manual improvements and updates.
228 @node Diffing
229 @chapter Diffing
230
231 To show the changes from you working tree to another revision, type
232 @kbd{d}. To show the changes between two arbitrary revisions, type
233 @kbd{D}.
48386c91 » Marius Vollmer
2008-08-16 Unified keymaps, make resetting use the commit at point instead of
234
22ee4f76 » Marius Vollmer
2008-08-13 Rebasing.
235 @node Resetting
236 @chapter Resetting
11689b7d » Marius Vollmer
2008-08-13 Manual additions.
237
238 Once you have added a commit to your local repository, you can not
52c2e3e4 » Marius Vollmer
2008-08-14 Speling fixes.
239 change that commit anymore in any way. But you can reset your current
240 head to an earlier commit and start over.
11689b7d » Marius Vollmer
2008-08-13 Manual additions.
241
6538ce4e » Marius Vollmer
2008-08-17 Manual improvements and updates.
242 If you have published your history already, rewriting it in this way
243 can be confusing and should be avoided. However, rewriting your local
244 history is fine and it is often cleaner to fix mistakes this way than
c8cdc5ed » Marius Vollmer
2008-08-31 Manual updates.
245 by reverting commits (with @kbd{v}, for example).
11689b7d » Marius Vollmer
2008-08-13 Manual additions.
246
6538ce4e » Marius Vollmer
2008-08-17 Manual improvements and updates.
247 Typing @kbd{x} will ask for a revision and reset your current head to
248 it. No changes will be made to your working tree and staging area.
249 Thus, the @emph{Staged changes} section in the status buffer will show
250 the changes that you have removed from your commit history. You can
251 commit the changes again as if you had just made them, thus rewriting
252 history.
11689b7d » Marius Vollmer
2008-08-13 Manual additions.
253
6538ce4e » Marius Vollmer
2008-08-17 Manual improvements and updates.
254 Typing @kbd{x} while point is in a line that describes a commit will
255 offer this commit as the default revision to reset to. Thus, you can
256 move point to one of the commits in the @emph{Unpushed commits}
257 section and hit @kbd{x RET} to reset your current head to it.
11689b7d » Marius Vollmer
2008-08-13 Manual additions.
258
6538ce4e » Marius Vollmer
2008-08-17 Manual improvements and updates.
259 Type @kbd{X} to reset your working tree and staging area to the most
260 recently committed state. This will discard your local modifications,
261 so be careful.
e4aceaf6 » Marius Vollmer
2008-08-13 Manual additions.
262
a21e998b » Marius Vollmer
2008-08-17 Manual fixes.
263 @node Branching
264 @chapter Branching
ff21f5ab » Marius Vollmer
2008-08-12 Some content for the manual.
265
266 The current branch is indicated in the header of the status buffer.
6538ce4e » Marius Vollmer
2008-08-17 Manual improvements and updates.
267 You can switch to a different branch by typing @kbd{b}. This will
268 immediately checkout the branch into your working copy, so you
269 shouldn't have any local modifications when switching branches.
270
a21e998b » Marius Vollmer
2008-08-17 Manual fixes.
271 Similar to @kbd{x}, typing @kbd{b} while point is at a commit
6538ce4e » Marius Vollmer
2008-08-17 Manual improvements and updates.
272 description will offer that commit as the default to switch to.
273 This will result in a detached head.
274
275 To create a new branch and switch to it immediately, type @kbd{B}.
ff21f5ab » Marius Vollmer
2008-08-12 Some content for the manual.
276
6538ce4e » Marius Vollmer
2008-08-17 Manual improvements and updates.
277 @node Merging
278 @chapter Merging
ff21f5ab » Marius Vollmer
2008-08-12 Some content for the manual.
279
280 Magit offers two ways to merge branches: manually and automatic. A
281 manual merge will apply all changes to your working tree and staging
282 area, but will not commit them, while a automatic merge will go ahead
283 and commit them immediately.
284
067e7156 » Marius Vollmer
2008-08-13 More manual stuff, use "Magit" and "Git" spelling.
285 Type @kbd{m} to initiate a manual merge, and type @kbd{M} for a
286 automatic merge.
287
ff21f5ab » Marius Vollmer
2008-08-12 Some content for the manual.
288 A manual merge is useful when carefully merging a new feature that you
6538ce4e » Marius Vollmer
2008-08-17 Manual improvements and updates.
289 want to review and test before even committing it. A automatic merge
290 is appropriate when you are on a feature branch and want to catch up
291 with the master, say.
ff21f5ab » Marius Vollmer
2008-08-12 Some content for the manual.
292
067e7156 » Marius Vollmer
2008-08-13 More manual stuff, use "Magit" and "Git" spelling.
293 After initiating a manual merge, the header of the status buffer will
294 remind you that the next commit will be a merge commit (with more than
295 one parent). If you want to abort a manual merge, just do a hard
c8cdc5ed » Marius Vollmer
2008-08-31 Manual updates.
296 reset to HEAD with @kbd{X}.
067e7156 » Marius Vollmer
2008-08-13 More manual stuff, use "Magit" and "Git" spelling.
297
298 Merges can fail if the two branches you merge want to introduce
299 conflicting changes. In that case, the automatic merge stops before
300 the commit, essentially falling back to a manual merge. You need to
301 resolve the conflicts and stage the resolved files, for example with
302 @kbd{S}.
303
304 You can not stage individual hunks one by one as you resolve them, you
305 can only stage whole files once all conflicts in them have been
e37626e2 » Marius Vollmer
2008-08-14 Manual improvements.
306 resolved.
067e7156 » Marius Vollmer
2008-08-13 More manual stuff, use "Magit" and "Git" spelling.
307
308 @node Rebasing
309 @chapter Rebasing
11689b7d » Marius Vollmer
2008-08-13 Manual additions.
310
22ee4f76 » Marius Vollmer
2008-08-13 Rebasing.
311 Typing @kbd{R} in the status buffer will initiate a rebase or, if one
312 is already in progress, ask you how to continue.
313
314 When a rebase is stopped in the middle because of a conflict, the
e37626e2 » Marius Vollmer
2008-08-14 Manual improvements.
315 header of the status buffer will indicate how far along you are in the
316 series of commits that are being replayed.
22ee4f76 » Marius Vollmer
2008-08-13 Rebasing.
317
318 Of course, you can initiate a rebase in any number of ways, by
319 configuring @code{git pull} to rebase instead of merge, for example.
e37626e2 » Marius Vollmer
2008-08-14 Manual improvements.
320 Such a rebase can be finished with @kbd{R} as well.
14b11535 » Marius Vollmer
2008-08-13 Manual additions.
321
2733ae2f » Marius Vollmer
2008-09-11 Document rewriting.
322 @node Rewriting
323 @chapter Rewriting
324
325 As hinted at earlier, you can rewrite your commit history. For
326 example, you can reset he current head to an earlier commit with
327 @kbd{x}. This leaves the working tree unchanged, and the status
9ce8cb34 » Marius Vollmer
2008-09-11 Fixed teh typos.
328 buffer will show all the changes that have been made since that new
2733ae2f » Marius Vollmer
2008-09-11 Document rewriting.
329 value of the current head. You can commit these changes again,
330 possibly splitting them into multiple commits as you go along.
331
9ce8cb34 » Marius Vollmer
2008-09-11 Fixed teh typos.
332 Amending your last commit is a common special case of rewriting
333 history like this.
2733ae2f » Marius Vollmer
2008-09-11 Document rewriting.
334
335 Another common way to rewrite history is to reset the head to an
9ce8cb34 » Marius Vollmer
2008-09-11 Fixed teh typos.
336 earlier commit, and then to cherry pick the previous commits in a
337 different order. You could pick them from the reflog, for example.
2733ae2f » Marius Vollmer
2008-09-11 Document rewriting.
338
9ce8cb34 » Marius Vollmer
2008-09-11 Fixed teh typos.
339 Magit has several commands that can simplify the book keeping
340 associated with rewriting. These commands all start with the @kbd{r}
341 prefix key.
2733ae2f » Marius Vollmer
2008-09-11 Document rewriting.
342
343 Typing @kbd{r s} will start a rewrite operation. You will be prompted
344 for a @emph{base} commit, and all commits between the current head and
345 this commit are put in a list of @emph{Pending commits} (including the
346 base commit). The current head will then be reset to the parent of
347 the base commit.
348
349 You would then typically use @kbd{a} and @kbd{A} to cherry pick
350 commits from the list of pending commits in the desired order, until
351 all have been applied. Magit shows which commits have been applied by
352 changing their marker from @code{*} to @code{.}.
353
354 Using @kbd{A} will immediately commit the commit (as usual). If you
9ce8cb34 » Marius Vollmer
2008-09-11 Fixed teh typos.
355 want to combine multiple previous commits into a single new one, use
2733ae2f » Marius Vollmer
2008-09-11 Document rewriting.
356 @kbd{a} to apply them all to your working tree, and then commit them
9ce8cb34 » Marius Vollmer
2008-09-11 Fixed teh typos.
357 together.
2733ae2f » Marius Vollmer
2008-09-11 Document rewriting.
358
7419a8b4 » Marius Vollmer
2008-09-15 Mention non-support for rewriting merge commits in the manual.
359 Magit has no explicit support for rewriting merge commits. It will
360 happily include merge commits in the list of pending commits, but
361 there is no way of replaying them automatically. You have to redo the
362 merge explicitly.
363
2733ae2f » Marius Vollmer
2008-09-11 Document rewriting.
364 You can also use @kbd{v} to revert a commit when you have changed your
365 mind. This will change the @code{.} mark back to @code{*}.
366
367 Once you are done with the rewrite, type @kbd{r t} to remove the book
368 keeping information from the status buffer.
369
370 If you rather wish to start over, type @kbd{r a}. This will abort the
371 rewriting, resetting the current head back to the value it had before
372 the rewrite was started with @kbd{r s}.
373
374 Typing @kbd{r f} will @emph{finish} the rewrite: it will apply all
375 unused commits one after the other, as if you would us @kbd{A} with
376 all of them.
377
378 You can change the @kbd{*} and @kbd{.} marks of a pending commit
379 explicitly with @kbd{r *} and @kbd{r .}.
380
381 In addition to a list of pending commits, the status buffer will show
382 the @emph{Pending changes}. This section shows the diff between the
383 original head and the current head. You can use it to review the
384 changes that you still need to rewrite, and you can apply hunks from
385 it, like from any other diff.
386
ff21f5ab » Marius Vollmer
2008-08-12 Some content for the manual.
387 @node Pushing and Pulling
388 @chapter Pushing and Pulling
389
151ae0a8 » Marius Vollmer
2008-08-21 Redone key bindings for pulling, leaving 'U' free for unstage-all.
390 Magit will run @code{git push} when you type @kbd{P}. You can type
391 @kbd{$} to pop up a buffer with the transcript of running these
392 commands.
393
394 Typing @kbd{f} will run @code{git remote update} and @kbd{F} will run
395 @code{git pull}.
14b11535 » Marius Vollmer
2008-08-13 Manual additions.
396
e37626e2 » Marius Vollmer
2008-08-14 Manual improvements.
397 That's almost all the support for remote repositories that Magit
398 offers. You should have setup your Git configuration to do the right
399 thing for @code{git push} and @code{git pull}.
400
14b11535 » Marius Vollmer
2008-08-13 Manual additions.
401 If you have configured a default remote repository for the current
402 branch (by setting the Git config option
403 @code{branch.<branch>.remote}), Magit will show that repository in the
404 status buffer header.
405
406 In this case, the status buffer will also have a @emph{Unpushed
7ae8fabb » Marius Vollmer
2008-08-24 Typo in manual.
407 commits} section that shows the commits on your current head that are
7a57506a » Marius Vollmer
2008-08-14 Updated manual.
408 not in the branch named @code{<remote>/<branch>}. This section works
151ae0a8 » Marius Vollmer
2008-08-21 Redone key bindings for pulling, leaving 'U' free for unstage-all.
409 just like the history buffer: you can see details about a commit with
c8cdc5ed » Marius Vollmer
2008-08-31 Manual updates.
410 @kbd{RET}, compare two of them with @kbd{.} and @kbd{=}, and you can
411 reset your current head to one of them with @kbd{x}, for example.
14b11535 » Marius Vollmer
2008-08-13 Manual additions.
412
1017a27b » Marius Vollmer
2008-09-07 Updated manual.
413 When the remote branch has changes that are not in the current branch,
414 Magit shows them in a section called @emph{Unpulled changes}. Typing
415 @kbd{F} will merge them into the current branch.
416
ff21f5ab » Marius Vollmer
2008-08-12 Some content for the manual.
417 @bye
Something went wrong with that request. Please try again.