Table of Contents

Git versioning short how-to

General

Local states

-mShow modified files in the output
-dShow deleted files in the output
-uShow unmerged files in the output (forces –stage)
-cShow cached files in the output (default)

Remote branches

Note:This is usefull, if you add some new ignores which where already checked in into git!

Git cache

Note:Everything is up to date here!

Search in log

Diffing

Patching

If you want to generate a patch for any changes from any previous commit, you can use git log to list it.

Note:You can limit the patch output for a limited number of commits (-1, -2, …​)

Get a file from different branch

It’s possible to get a file from a different branch or checkin. First go into the directory and branch, you want to add or change the file. Now, you can get the content of the desired file:

1Using a commit id
2Using another branch
Note:This is only working, if the path in repository is the same!

Restore a differen version of a file

Sometimes you need to get an older version of a file. Here this procedure is shown.

Assuming, you want to get the version of hash 8bec017.