Essential Magit

My needs are quite simple as I often stage all files at each iteration, add a message, and push to remote repository:

$ git add --all . && git commit -m "message" && git push -u origin master

or, when no new files are added:

$ git commit -a -m "message" && git push -u origin master

However, magit is convenient in that all unstaged/modified files can be shown at any time. (There are likely many other benefits.)

I found this page to be a good reference on the essential magit commands.

For a new repository:

Step Command Description
1. M-x magit-init initialize
2. C-u S stage all
3. c c open commit message
4. C-c C-c commit
5. M-x magit-add-remote add remote repo name (remote: origin, url: git@…/project.git)
6. b u set upstream (default: origin/master)
7. P u push upstream

For an existing repository:

Step Command Description
1. M-x magit-status open magit
2. C-u S stage all
3. c c open commit message
4. C-c C-c commit
5. P u push upstream

Generated by Org-mode 9.2 with Emacs 26