From 557200dbba3416f8dc250f5f85640c05f0d86287 Mon Sep 17 00:00:00 2001
From: Guillaume Pasquet <dev@etenil.net>
Date: Tue, 7 Dec 2021 22:29:53 +0000
Subject: Added notes for VC (03)

Added notes for VC usage in livestream 03.
---
 03/vc-mode.org | 100 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 100 insertions(+)
 create mode 100644 03/vc-mode.org

(limited to '03/vc-mode.org')

diff --git a/03/vc-mode.org b/03/vc-mode.org
new file mode 100644
index 0000000..ad888e9
--- /dev/null
+++ b/03/vc-mode.org
@@ -0,0 +1,100 @@
+#+title: Exploring VC
+* What is VC
+  
+  VC is Emacs'default version-control integration. It is a framework
+  that supports multiple backends such as:
+
+  - Git
+  - Bazaar
+  - Subversion
+  - CVS
+  - more...
+
+We'll review 2 workflows, one with _git_ and one with _svn_.
+
+* Git
+
+  The typical git workflow consists of:
+  
+  - Creating a repo
+  - Creating a feature branch
+  - Adding files
+  - Coding
+  - Commiting
+  - Pushing
+
+** Creating a repo
+
+   To create a repo, start by editing files in a new directory. Hop in
+   and hit =C-x v i=. You'll be asked to choose a backend. Select
+   =git= and your project will be initialised.
+
+** Create a feature branch
+
+   Hit the combo =C-u C-x v v= to create a new branch. Enter the
+   branch name you wish. Once created, the branch will not yet be
+   checked out. Do =C-x v r= to choose your newly created branch.
+
+** Adding files
+
+   Create the files as usual and code into them. To add to version
+   control, hit =C-x v i=.
+
+** Committing
+
+   To commit /the current file/, use VC's magical /"next step"/ command =C-x v v= and
+   enter the commit information.
+
+   To commit more than one change in one go, open up the /VC Dir/ with
+   =C-x v d=. Then mark all changes you want to commit together with
+   =m= (like in dired) and commit with =v=.
+
+** Pushing
+
+   Push by typing =C-x P=.
+
+** Pulling
+
+   You can push remote changes by using =C-x v +=.
+
+* SVN
+
+  The typical git workflow consists of:
+  
+  - Pulling changes
+  - Adding files
+  - Coding
+  - Commiting
+
+** Adding files
+
+   Create the files as usual and code into them. To add to version
+   control, hit =C-x v i=.
+
+** Committing
+
+   To commit /the current file/, use VC's magical /"next step"/ command =C-x v v= and
+   enter the commit information.
+
+   To commit more than one change in one go, open up the /VC Dir/ with
+   =C-x v d=. Then mark all changes you want to commit together with
+   =m= (like in dired) and commit with =v=.
+
+** Pushing
+
+   Push by typing =C-x P=.
+
+** Pulling
+
+   You can push remote changes by using =C-x v +=.
+
+* Common actions
+
+** View logs
+
+   To view the project log, hit =C-x v ==.
+
+** Blame
+
+   To annotate a file (git blame), type =C-x v g=.
+
-- 
cgit v1.2.3