Many commands in magit pop up a small buffer prompting you to specify options. To see the commits for a specific file, in the git status buffer type "l -f ". Then you will see all of the commits for 1 file! cool!
You typically start a magit section by running magit-status
. You can stage un-staged with "s". You can commit those changes with "cc". You can push those changes with "Pp".
Un-staging commits can be done via "u".
$
will add another buffer that shows you the commands magit is commitings
on a modified file will stage itS
will stage all modified filesi
will add the current file to the project’s git ignoreu
will unstage the current modified filec c
will commit your staged changes. Type in a message in the buffer that appears, and then hit C-c C-c
to close the bufferP P
will push your changesF F
will pull your changesy
will take you to the branch managerl r l
will allow you to see the commits that make two branches differ. This happens when branch "master" is behind branch "new feature". You can see the differences between the two branches and cherrypick them.a
will apple the current commit to your current branch. This allows me to cherry pick changes from one "bug fix" branch to theA
does the same as above, but it tries to automatically commit the changes if there are no merge conflicts.v
will revert the commit. It will apply the changes made by a commit in reverse. But you still need to commit the changes.C-c u
unmark marked commits=
show the differ between the marked commit and the commit under pointk
will delete the branch under pointC-u k
will force delete a branch under pointc
will create a new branchr
renames the branchT
on a local branch changes which remote branch it tracksM-w saves the hash of the current region to the kill ring.
"n" and "p" move to the next and previous hunks.
https://www.youtube.com/watch?v=mtliRYQd0j4
Put point on a commit you want to split open:
Rebase -> m modify a commmit
magit-reset (x) RET head~ RET
This puts head at the position before the commit you want to modify. And you are free to split the commit.
rebase -> c continue for complete the action