Git
- Git is a version control system that is used for software development and other version control tasks.
- A repository to backup files and to update the files. So, you can use it later for restore or update.
- You probably had a experience that you updated some shared filed and replace it, but actually you erased all the parts which others made updates. This is a common situation during working on a software development as a team.
- If you use Git, it will ask you whether you really want to replace the file when there is an updated file by others.
Repository
- Remote repository: files are managed by remote repository server, and this is for sharing with others.
- Local repository: personal repository that file is saved on my PC .
Creating Repository
- You can either create a brand new repository from scratch or by cloning an existing remote repository onto your local machine.
Commit
- The “commit” operation enables you to record changes that were made to a file or directory in the Git history.
- By commiting every change made, you will be able to view all changes chronologically in the respective file or directory.
Working Tree and Index
- A “working tree” consist of files that you are currently working on.
-
An “index” is a staging area where new commits are prepared. It acts as the interface between a repository and a working tree.
- Changes made on the working tree will not be commited directly to the repository. They need to be staged on the index first
Git Hub vs. Git Lab
GitHub
- suitable for OpenSource project
- extra fee is needed for private repository, not suitable for personal project.
GitLab
- free for using private repository.
- If you pay extra, you can get technical support as well.
Citation
Images and most of words are from the website below
- https://backlogtool.com/git-guide/en/