Emacs + Magit = Git Magic

Total Page:16

File Type:pdf, Size:1020Kb

Emacs + Magit = Git Magic Emacs + Magit = Git Magic Shakthi Kannan Version 1.0 GNU FDL Shakthi Kannan Emacs + Magit = Git Magic Initialization M-x magit-status Open magit buffer Shakthi Kannan Emacs + Magit = Git Magic Buffers $ Actual git command executed g Update magit status Shakthi Kannan Emacs + Magit = Git Magic Section Visibility TAB Toggle current section S-TAB Toggle visibility of current children 1-4 Shows four levels of a section M-f1-4g Shows four levels af ALL sections Shakthi Kannan Emacs + Magit = Git Magic Untracked files s Add untracked file to staging area C-u S Stage all untracked and tracked files i Add filename to .gitignore k Delete untracked file, forever Shakthi Kannan Emacs + Magit = Git Magic Staging and Committing u Unstage C-u s Prompt file for staging S Move all hunks to stage U Unstage everything that has been staged c Pop buffer for commit message C-c C-c Amend commit message C-c C-k Erase magit-log-edit buffer and bury it Shakthi Kannan Emacs + Magit = Git Magic History l l History of current head in terse form l L History in verbose form RET More info on commit in new buffer v Revert the current commit C-w Copy sha1 to kill ring . Mark commit = Difference between current commit and marked Shakthi Kannan Emacs + Magit = Git Magic Reflog l h Browse reflog Shakthi Kannan Emacs + Magit = Git Magic Diffing d Difference between working tree and another revision D Difference between any two arbitrary revisions Shakthi Kannan Emacs + Magit = Git Magic Tagging t t Create lightweight tag t a Create annotated tag Shakthi Kannan Emacs + Magit = Git Magic Resetting x Reset your current head X Reset working tree and staging area to recent commit state Shakthi Kannan Emacs + Magit = Git Magic Stashing z z Create new stash a Apply stash A Pop a stash k Drop a stash Shakthi Kannan Emacs + Magit = Git Magic Branching b v Branch manager b b Switch to a different branch b n Create new branch and switch to it Shakthi Kannan Emacs + Magit = Git Magic Branch List k Delete current branch C-u k Delete branch even if it hasn't been merged m m Merge the branch in current line to specified g Refresh branch list q Buries the branch list and deletes its window Shakthi Kannan Emacs + Magit = Git Magic Wazzup w Summary of other branches to master TAB Show list of commits Shakthi Kannan Emacs + Magit = Git Magic Merging m m Initial merge Shakthi Kannan Emacs + Magit = Git Magic Rebase R Initiate rebase Shakthi Kannan Emacs + Magit = Git Magic Pushing and Pulling PP Push to remote FF Git pull Shakthi Kannan Emacs + Magit = Git Magic Using Git Directly : Run git commands directly Shakthi Kannan Emacs + Magit = Git Magic References Magit user manual. http://magit.github.com/magit/magit.html Git. http://git-scm.com/ Shakthi Kannan Emacs + Magit = Git Magic.
Recommended publications
  • Emacspeak — the Complete Audio Desktop User Manual
    Emacspeak | The Complete Audio Desktop User Manual T. V. Raman Last Updated: 19 November 2016 Copyright c 1994{2016 T. V. Raman. All Rights Reserved. Permission is granted to make and distribute verbatim copies of this manual without charge provided the copyright notice and this permission notice are preserved on all copies. Short Contents Emacspeak :::::::::::::::::::::::::::::::::::::::::::::: 1 1 Copyright ::::::::::::::::::::::::::::::::::::::::::: 2 2 Announcing Emacspeak Manual 2nd Edition As An Open Source Project ::::::::::::::::::::::::::::::::::::::::::::: 3 3 Background :::::::::::::::::::::::::::::::::::::::::: 4 4 Introduction ::::::::::::::::::::::::::::::::::::::::: 6 5 Installation Instructions :::::::::::::::::::::::::::::::: 7 6 Basic Usage. ::::::::::::::::::::::::::::::::::::::::: 9 7 The Emacspeak Audio Desktop. :::::::::::::::::::::::: 19 8 Voice Lock :::::::::::::::::::::::::::::::::::::::::: 22 9 Using Online Help With Emacspeak. :::::::::::::::::::: 24 10 Emacs Packages. ::::::::::::::::::::::::::::::::::::: 26 11 Running Terminal Based Applications. ::::::::::::::::::: 45 12 Emacspeak Commands And Options::::::::::::::::::::: 49 13 Emacspeak Keyboard Commands. :::::::::::::::::::::: 361 14 TTS Servers ::::::::::::::::::::::::::::::::::::::: 362 15 Acknowledgments.::::::::::::::::::::::::::::::::::: 366 16 Concept Index :::::::::::::::::::::::::::::::::::::: 367 17 Key Index ::::::::::::::::::::::::::::::::::::::::: 368 Table of Contents Emacspeak :::::::::::::::::::::::::::::::::::::::::: 1 1 Copyright :::::::::::::::::::::::::::::::::::::::
    [Show full text]
  • Emacs – Beating the Learning Curve from Zero to Lightspeed
    Emacs – Beating the Learning Curve From Zero to Lightspeed. Timo Bingmann August 18, 2015 Contents 1 Overview 2 2 Most Important Key Chords 2 2.1 When Things Go Wrong . 2 2.2 Meta-X . 3 2.3 Move Around in Text . 3 2.4 Mark, Copy, and Paste Text . 3 2.5 Open File into Buffers . 3 2.6 Switching Buffers (Open Files) . 4 2.7 Organizing Buffers into Frames and Windows . 4 2.8 Search and Replace . 4 2.9 Change Font Size . 4 3 Advanced Text Editing 4 3.1 Rectangle Copy/Paste . 5 3.2 Keyboard Macros . 5 3.3 Run Shell Commands . 5 3.4 Multiple Cursors . 5 4 Directory Listings (dired) 5 4.1 Give Me a Terminal, NOW! . 6 4.2 Tramp Mode . 6 5 Customization 6 6 Source code editing 7 7 C/C++ Projects 7 7.1 Identifier Expansion . 7 7.2 Snippets . 7 7.3 Semantics Jumps . 8 7.4 Ede (Cedet) Projects . 8 7.5 Grep and Ag . 8 7.6 Bookmarks . 8 7.7 ecb - Emacs Code Browser . 8 7.8 TODO Tag Browsing . 9 1 7.9 gdb inside emacs. 9 8 Magit - Git Magic! 9 9 Editing LATEX 10 10 org-mode 10 11 evil-mode 11 1 Overview This is a quick and dirty emacs tutorial. It does not feature the most flashy features or goodies. Instead, it focuses on solid day-to-day efficiency features. It is probably best to print out this tutorial, grab a version of emacs, and start reading and trying out each command in this manual from top to bottom.
    [Show full text]
  • 1.2 (Obsolete)
    Magit User Manual for version 1.2 (obsolete) The Magit Project Developers Copyright c 2008-2015 The Magit Project Developers Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. i Table of Contents 1 Introduction::::::::::::::::::::::::::::::::::::: 1 2 Acknowledgments::::::::::::::::::::::::::::::: 2 3 Sections:::::::::::::::::::::::::::::::::::::::::: 3 4 Status:::::::::::::::::::::::::::::::::::::::::::: 4 5 Untracked files :::::::::::::::::::::::::::::::::: 5 6 Staging and Committing ::::::::::::::::::::::: 6 7 History :::::::::::::::::::::::::::::::::::::::::: 8 8 Reflogs::::::::::::::::::::::::::::::::::::::::::: 9 9 Commit Buffer::::::::::::::::::::::::::::::::: 10 10 Diffing::::::::::::::::::::::::::::::::::::::::: 11 11 Tagging ::::::::::::::::::::::::::::::::::::::: 12 12 Resetting ::::::::::::::::::::::::::::::::::::: 13 13 Stashing::::::::::::::::::::::::::::::::::::::: 14 14 Branching::::::::::::::::::::::::::::::::::::: 15 15 The Branch Manager :::::::::::::::::::::::: 16 16 Wazzup ::::::::::::::::::::::::::::::::::::::: 17 17 Merging ::::::::::::::::::::::::::::::::::::::: 18 18 Rebasing :::::::::::::::::::::::::::::::::::::: 19 ii 19 Interactive Rebasing ::::::::::::::::::::::::: 20 20 Rewriting ::::::::::::::::::::::::::::::::::::: 21 21 Pushing and Pulling ::::::::::::::::::::::::: 22 22 Submodules:::::::::::::::::::::::::::::::::::
    [Show full text]
  • Magit Reference Card
    Magit Reference Card Getting help in Emacs C-h k 〈key〉 describe function bound to 〈key〉 C-h b list the current key-bindings for the focus buffer C-h m describe mode C-h l show the keys you have pressed 〈prefix〉 C-h show all key-bindings beginning with 〈prefix〉 Section Movement Section Visibility p previous section n next section TAB toggle visibility of current section P previous sibling section C-TAB cycle visibility of section and children N next sibling section M-TAB cycle visibility of diff-related sections ˆ parent section S-TAB cycle visibility of all sections in buffer Staging Status/Diff/Log Buffer s stage change at point SPC update commit/diff buffer or scroll up u unstage change at point DEL update commit/diff buffer or scroll down S stage all changes in worktree h show dispatch popup U reset index to some commit g refresh M-x magit-unstage-all remove all changes G refresh all M-x magit-stage-file stage current file q bury current buffer M-x magit-unstage-file unstage current file L toggle margin x soft reset (hard when argument is given) View Git Output y show references (tags and branches) Y cherry $ display process buffer for current repository C-c C-b move backward in buffer’s history k kill process represented by section at point C-c C-f move forward in buffer’s history Popups ! running git f fetching o submoduling b branching F pulling r rebasing B bisecting l logging w apply patches c committing m merging W format patches d diffing M remoting t tagging E ediff P pushing z stashing Status/Diff/Log Buffer References Buffer y compare references
    [Show full text]
  • )'S Tired Eto Ove Smdei ;Big,B{ in Doul Ladwolj Bt
    •' '• V - ' ''i V 'ik ; ' . 1 'r. -.'i ■ Ijtaforsptied Aiibthilieriw oFdjyi jE SS,D l H ^r^a Nelson leajads area ■ e p ric e : ■ f e r s into. s ta te5 mI eet. elections. OfOll eVev e r " ■ . :'SpORTS,Ci S^PMKEis ^ b p Clltilim bing? MW e s - N e W i ceirints H ........ .............. i p t f m n nbillvieto ovesmdeiin doulbt when.lawmakers sent the! mnsslver reserved for “We will have to rcpass ihele w hole H o u s e ^ t t ^ n i M ^ a i n m easu re to th e W hite House ' unopposed leg- thing,thlr as will tiie Senate,” saliaid Hep. lytopassfarn T h a t m e a n s Dush vetoedla t d i..- in s id e islation. The LouiseLot Slaughter. D-N.Y. "WtiVc can't t j ''' - '' ■'•:\^ ■-' * ' entent bill from the one CcCongress ^rm bill illwill Senate was lellet thi e farm bill just die." 5 t ^ * s ^ t a t e < l P ^ ' •' 3 1 6 -i0 8 v o te,le, Bush had vetoed the passed,pai raising questions tlthat the help afeasugaiifiar expcclcd to foi- TheWliltcT House, almost glgleeful- fiv^ycar'mealeasure, saying Jt waf. too eventualcvc law would be uncciconstltu- beet growers.rs. low suit. The Iy,ly.s seized on the fumble and sjsaid the ::W ASHiNGTON^ Th«T he -H ouse expensive ,aiand''gave-too' much tional.tlpi Republicans objecteited w hen -------------------— correct version mix-upmb coiild give Congressi limli e to bvcrwhymih^y.'rcjeciedfd 1P resident' m o n ey to wiwealthy farmers when DemocratsDe proposed passisslng the SeoPagoOl>1 would then bc fixfixi tlic “bloated” bill.
    [Show full text]
  • Pipenightdreams Osgcal-Doc Mumudvb Mpg123-Alsa Tbb
    pipenightdreams osgcal-doc mumudvb mpg123-alsa tbb-examples libgammu4-dbg gcc-4.1-doc snort-rules-default davical cutmp3 libevolution5.0-cil aspell-am python-gobject-doc openoffice.org-l10n-mn libc6-xen xserver-xorg trophy-data t38modem pioneers-console libnb-platform10-java libgtkglext1-ruby libboost-wave1.39-dev drgenius bfbtester libchromexvmcpro1 isdnutils-xtools ubuntuone-client openoffice.org2-math openoffice.org-l10n-lt lsb-cxx-ia32 kdeartwork-emoticons-kde4 wmpuzzle trafshow python-plplot lx-gdb link-monitor-applet libscm-dev liblog-agent-logger-perl libccrtp-doc libclass-throwable-perl kde-i18n-csb jack-jconv hamradio-menus coinor-libvol-doc msx-emulator bitbake nabi language-pack-gnome-zh libpaperg popularity-contest xracer-tools xfont-nexus opendrim-lmp-baseserver libvorbisfile-ruby liblinebreak-doc libgfcui-2.0-0c2a-dbg libblacs-mpi-dev dict-freedict-spa-eng blender-ogrexml aspell-da x11-apps openoffice.org-l10n-lv openoffice.org-l10n-nl pnmtopng libodbcinstq1 libhsqldb-java-doc libmono-addins-gui0.2-cil sg3-utils linux-backports-modules-alsa-2.6.31-19-generic yorick-yeti-gsl python-pymssql plasma-widget-cpuload mcpp gpsim-lcd cl-csv libhtml-clean-perl asterisk-dbg apt-dater-dbg libgnome-mag1-dev language-pack-gnome-yo python-crypto svn-autoreleasedeb sugar-terminal-activity mii-diag maria-doc libplexus-component-api-java-doc libhugs-hgl-bundled libchipcard-libgwenhywfar47-plugins libghc6-random-dev freefem3d ezmlm cakephp-scripts aspell-ar ara-byte not+sparc openoffice.org-l10n-nn linux-backports-modules-karmic-generic-pae
    [Show full text]
  • Full Stack Lisp Build and Deploy Modern Lisp Applications
    Full Stack Lisp Build and deploy modern Lisp applications Pavel Penev This book is for sale at http://leanpub.com/fullstacklisp This version was published on 2016-05-30 This is a Leanpub book. Leanpub empowers authors and publishers with the Lean Publishing process. Lean Publishing is the act of publishing an in-progress ebook using lightweight tools and many iterations to get reader feedback, pivot until you have the right book and build traction once you do. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License Tweet This Book! Please help Pavel Penev by spreading the word about this book on Twitter! The suggested hashtag for this book is #FullStackLisp. Find out what other people are saying about the book by clicking on this link to search for this hashtag on Twitter: https://twitter.com/search?q=#FullStackLisp CONTENTS Contents Warning to early readers ..................................... i Current Status ......................................... i What remains to be written .................................. ii Additional ideas ........................................ ii Thank you! ........................................... ii About ................................................ iii Introduction ............................................ iv Prerequisites ............................................ v Typographic conventions ..................................... vi Part One: Development environment .............. 1 Chapter 1: Roswell ........................................ 2
    [Show full text]
  • Flycheck Release 32-Cvs
    Flycheck Release 32-cvs Aug 25, 2021 Contents 1 Try out 3 2 The User Guide 5 2.1 Installation................................................5 2.2 Quickstart................................................7 2.3 Troubleshooting.............................................8 2.4 Check buffers............................................... 12 2.5 Syntax checkers............................................. 14 2.6 See errors in buffers........................................... 18 2.7 List all errors............................................... 22 2.8 Interact with errors............................................ 24 2.9 Flycheck versus Flymake........................................ 27 3 The Community Guide 33 3.1 Flycheck Code of Conduct........................................ 33 3.2 Recommended extensions........................................ 34 3.3 Get help................................................. 37 3.4 People.................................................. 37 4 The Developer Guide 45 4.1 Developer’s Guide............................................ 45 5 The Contributor Guide 51 5.1 Contributor’s Guide........................................... 51 5.2 Style Guide................................................ 54 5.3 Maintainer’s Guide............................................ 57 6 Indices and Tables 63 6.1 Supported Languages.......................................... 63 6.2 Glossary................................................. 85 6.3 Changes................................................. 85 7 Licensing 93 7.1 Flycheck
    [Show full text]
  • Ag.El Documentation Release 0.45
    ag.el Documentation Release 0.45 Wilfred Hughes Feb 25, 2018 Contents 1 Installation 3 1.1 Operating System............................................3 1.2 Emacs..................................................3 1.3 Ag....................................................3 1.4 Ag.el...................................................3 2 Usage 5 2.1 Running a search.............................................5 2.2 The results buffer.............................................5 2.3 Search for file names...........................................6 3 Configuration 7 3.1 Highlighting results...........................................7 3.2 Path to the ag executable.........................................7 3.3 Visiting the results............................................8 3.4 Overriding the arguments passed to ag..................................8 3.5 Hooks...................................................8 3.6 Multiple search buffers..........................................8 4 Extensions 9 4.1 Using with Projectile...........................................9 4.2 Customising the project root.......................................9 4.3 Editing the results inline.........................................9 4.4 Focusing and filtering the results.....................................9 4.5 Writing Your Own............................................9 5 Developing ag.el 11 5.1 Using flycheck (optional)........................................ 11 6 Changelog 13 6.1 Previous Versions............................................ 13 6.2 master.................................................
    [Show full text]
  • GNU Hyperbole Manual
    GNU Hyperbole Manual The Everyday Hypertextual Information Manager Bob Weiner This manual is for GNU Hyperbole (Edition 7.1.3, Published August, 2020). Copyright c 1989-2020 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation. GNU Hyperbole sofware is distributed under the terms of the GNU General Public License version 3 or later, as published by the Free Software Foundation, Inc. GNU Hyperbole is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABIL- ITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details in the file, \COPYING", within the Hyperbole package directory. Published by the Free Software Foundation, Inc. Author: Bob Weiner E-mail: <[email protected]> (This is a mail list). Web: www.gnu.org/software/hyperbole The body of the manual was written in Emacs and laid out using the GNU Texinfo markup language. i Short Contents GNU Hyperbole :::::::::::::::::::::::::::::::::::::::::: 1 1 Introduction :::::::::::::::::::::::::::::::::::::::::: 2 2 Smart Keys :::::::::::::::::::::::::::::::::::::::::: 7 3 Buttons :::::::::::::::::::::::::::::::::::::::::::: 18 4 Menus:::::::::::::::::::::::::::::::::::::::::::::: 38 5 HyControl :::::::::::::::::::::::::::::::::::::::::: 42 6 Koutliner ::::::::::::::::::::::::::::::::::::::::::: 47 7 HyRolo :::::::::::::::::::::::::::::::::::::::::::::
    [Show full text]
  • Reconsidering Constitutional Formation I National Sovereignty a Comparative Analysis of the Juridification by Constitution Studies in the History of Law and Justice
    Studies in the History of Law and Justice 6 Series Editors: Georges Martyn · Mortimer Sellers Ulrike Müßig Editor Reconsidering Constitutional Formation I National Sovereignty A Comparative Analysis of the Juridification by Constitution Studies in the History of Law and Justice Volume 6 Series editors Georges Martyn University of Ghent , Gent , Belgium Mortimer Sellers University of Baltimore , Baltimore , Maryland, USA Editorial Board António Pedro Barbas Homem, Universidade de Lisboa Emanuele Conte, Università degli Studi Roma Tre Gigliola di Renzo Villata, Università degli Studi di Milano Markus Dirk Dubber, University of Toronto William Ewald, University of Pennsylvania Law School Igor Filippov, Moscow State University Amalia Kessler, Stanford University Mia Korpiola, Helsinki Collegium for Advanced Studies Aniceto Masferrer, Universidad de Valencia Yasutomo Morigiwa, Nagoya University Graduate School of Law Ulrike Muessig, Universität Passau Sylvain Soleil, Université de Rennes James Q.Whitman, Yale Law School The purpose of this book series is to publish high quality volumes on the history of law and justice. Legal history can be a deeply provocative and infl uential fi eld, as illustrated by the growth of the European universities and the ius commune, the French Revolution, the American Revolution, and indeed all the great movements for national liberation through law. The study of history gives scholars and reformers the models and cour- age to question entrenched injustices, by demonstrating the contingency of law and other social arrangements. Yet legal history today fi nds itself diminished in the universities and legal academy. Too often scholarship betrays no knowledge of what went before, or why legal institutions took the shape they did.
    [Show full text]
  • Emacs Documentation Release Latest
    Emacs Documentation Release latest Jun 04, 2021 Documentation 1 Licence 3 2 How to Use This Document 5 3 Install Packages 7 4 General 9 4.1 Utilities..................................................9 4.2 Remove Keybind.............................................9 4.3 Assorted Pieces..............................................9 4.4 Window Layout/Navigation....................................... 11 4.5 System Path/Keyboard.......................................... 12 4.6 General Editing.............................................. 13 4.7 Minibuffer history............................................ 13 5 GUI - Emacs Looks Cool 15 5.1 Fonts................................................... 15 5.2 Minimalists GUI............................................. 15 5.3 Theme.................................................. 15 5.4 Mode Line................................................ 16 6 Completion and Selection 17 6.1 Helm - Fuzzy Match........................................... 17 6.2 Multi-Cursor & Helm-swoop - Multiple Selection........................... 18 6.3 ace-jump................................................. 19 6.4 Expand-Region - Incremental Selection................................. 19 7 File Management 21 7.1 Alternative to shell............................................ 21 7.2 Projectile - Directory Access....................................... 23 7.3 Remote (SSH).............................................. 23 7.4 Git Sync................................................. 24 7.5 Testing Buffers.............................................
    [Show full text]