35 version control
VC commands Keystrokes Command name Action C-x v v vc-next-action Go to the next logical version control state. C-x v d...
VC commands Keystrokes Command name Action C-x v v vc-next-action Go to the next logical version control state. C-x v d...
Comparing with Ediff Ediff commands Keystrokes Command name Action Space or n ediff-next-difference Move to the next difference betwee...
Working with Groups and Subtrees of Files C-x v d (for vc-directory)
Simply invoke Emacs with the command-line option -q, and Emacs will not run your .emacs file. .emacs exsiting file Saving .emacs Restart the emacs M-x load-file ~/.emacs Enter
Command: $ cat rearrange1.py Code output: #!/usr/bin/env python3 import re def rearrange_name(name): result = re.search(r"^([\w .]*), ([\w .]*)$", name) if result == None: re...
Command: $ cat cpu_usage.py Code output: #!/usr/bin/env python3 import psutil def check_cpu_usage(percent): usage = psutil.cpu_percent() return usage < percent if not check_cpu_us...
File with code #!/usr/bin/env python3 import shutil def check_disk_usage(disk, min_absolute, min_percent): """Returns True if there is enough free disk space, false otherwise.""" du = shutil.di...
diff and patch The diff command You use the diff command to find the differences between two files. On its own, it’s a bit hard to use; instead, use diff -u to find lines that differ in two files:...
Command: $ git config --global user.email "me@example.com" $ git config --global user.name "My name" $ mkdir checks $ cd checks # Initialized empty Git repository in `/home/user/checks/.git/` $ gi...
Command: $ cd checks $ ls -l Code output: total 4 -rw-r--r-- 1 user user 657 Jul 9 12:52 disk_usage.py Command: $ git status Code output: On branch master nothing to commit, working tree clea...