Version Contrl Example
Version Contrl Example
$ ls -lta
total 8
$ cd a-project
$ git init
$ git log
$ git status
On branch master
modified: a.txt
no changes added to commit (use "git add" and/or "git commit -a")
$ git commit -m
$ git logs
log
$ git log
second version
commit b1be93223c10a20a9600449ad00b90ba62b6c3cf
first version
sf2k@DESKTOP-KDSNI90 MINGW64 ~/Downloads/git/a-project (master)
$ cat a.txt
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
If you want to create a new branch to retain commits you create, you may
git switch -
$ cat a.txt
$ cat a.txt
$ vi a.txt
Already on 'master'
M a.txt
sf2k@DESKTOP-KDSNI90 MINGW64 ~/Downloads/git/a-project (master)
On branch master
modified: a.txt
no changes added to commit (use "git add" and/or "git commit -a")
warning: in the working copy of 'a.txt', LF will be replaced by CRLF the next
time Git touches it
$ rm a.txt
$ cat a.txt
$ cd ..
$ cd Demos/
$ ls -lta
total 26