Git basic

1.What is Git

Git is the distributed version control system. Git is responsible for keeping track of changes to

content (usually source code files), and it provides mechanisms for sharing that content with others.

2.Git Hub

GitHub is a company that provides Git repository hosting.

3.Git installation

4.Eclipse Git

  • JGit is the Java implementation of Git. It is a library, that also can be used in your own applications. It also provides some sort of CLI operations.
  • EGit on the other side is the Eclipse team provider plugin for Git, which uses JGit as Git implementation. Simplified you could say EGit is the UI part, and JGit the background part. JGit doesn't depend on EGit, but EGit does depend on JGit.

5.Files in Git

files in git : tracked, untracked and ignored.

ignored files are tracked in a special file name .gitignore (can be for specify repository

or all repositories by git config) that is checked in at the root of your repository.

There is no explicit git ignore command, instead the .gitignore file must be edited and

committed by hand when you have new files that you wish to ignore.

.gitnore files contain patterns that are matched against file names in your repository to determine

whether or not they should be ignored.

6.Git flow

git_basic_1

7.How to contribute to other people’s project

When we work with another user’s public repository, typically we have read access to the code but not write access. In order to change their code, we have to create pull request. The flow is :

git_basic_2

Written on October 19, 2016