Fxperience SAP
December 14, 2016
RCS == VCS
VCSs are best-suited for tracking text files, but can be used for binary files like images, audios, videos etc
They are used for documentation projects, writing stories, books, articles etc
Examples: Subversion (SVN), Mercurial
Git is a distributed version-control system which is famed to be extremely fast and flexible
Let us look at some common terminologies associated with Git and VCS in general
.git
subfolders.git
directory, without a working treeSending changes to a remote repository
Fetching changes from a remote repository
README is now in staging area
# On branch master
#
# Initial commit
#
# Changes to be committed:
# (use "git rm --cached <file>..." to unstage)
#
# new file: README
#
[master (root-commit) 9ff077b] Initial commit
1 file changed, 1 insertion(+)
create mode 100644 README
First change has been committed
# On branch master
nothing to commit, working directory clean
diff --git a/README b/README
index 96f0412..eeff8df 100644
--- a/README
+++ b/README
@@ -1 +1,3 @@
This is my first repository
+
+This is the change for the second commit
commit 20ac39fb4e12237af37ae480f990eae2f4592a6b
Author: Kaustav Das Modak <kaustav.dasmodak@yahoo.co.in>
Date: Fri Aug 30 13:57:43 2013 +0530
Modified README
commit 9ff077b996e6cf917788d8d6393ef07fd9c2b753
Author: Kaustav Das Modak <kaustav.dasmodak@yahoo.co.in>
Date: Fri Aug 30 09:43:12 2013 +0530
Initial commit
20ac39fb4e12237af37ae480f990eae2f4592a6b Modified README
9ff077b996e6cf917788d8d6393ef07fd9c2b753 Initial commit
Download here
* master
Switched to branch 'newbranch'
Shortcut
$ git checkout -b newbranch
Capitalized, short (50 chars or less) summary More detailed explanatory text, if necessary. Wrap it to about 72 characters or so. In some contexts, the first line is treated as the subject of an email and the rest of the text as the body. The blank line separating the summary from the body is critical (unless you omit the body entirely); tools like rebase can get confused if you run the two together. Write your commit message in the imperative: "Fix bug" and not "Fixed bug" or "Fixes bug." This convention matches up with commit messages generated by commands like git merge and git revert. Further paragraphs come after blank lines. - Bullet points are okay, too - Typically a hyphen or asterisk is used for the bullet, preceded by a single space, with blank lines in between, but conventions vary here - Use a hanging indent
Have git ignore certain files
Updating 20ac39f..9f16d40
Fast-forward
ME | 1 +
1 file changed, 1 insertion(+)
create mode 100644 ME
Use $ git log, create branches, do edits and commits, e.g.:
This was a HTML5 presentation, written using RevealJS