↑ Top
Kaai24
dev studios
| Sign in | DE EN

Git

The version control system


If you are working with many text files, you should track your changes in a version control system. This helps maintaining changes and keeping backups.

Git is a very widly used and easy one.

Basics
0

Create a new local repository and ignore all *.gz files and everything below tmp/

git init
nano .gitignore

*.gz
tmp/

The pure basics (optimized)

git staus
git add *
git commit -a -m "comment"
git log

Branches
0

Create and switch to a branch

git branch new-feature
git checkout new-feature

"checkout" is like read from repository.

Merge branch master with an other branch

git checkout master
git merge new-feature

Delete a branch

git branch -d new-feature

Undo
0

Undo a file

git checkout $file

Undo a branch

git reset

More
0

(Edited 15-04-20)

Comments