Git Basic

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.

Screen Shot 2016-07-19 at 4.27.12 PM

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 .

Screen Shot 2016-07-19 at 4.26.35 PM

Creating Repository

  • You can either create a brand new repository from scratch or by cloning an existing remote repository onto your local machine.

Screen Shot 2016-07-19 at 4.28.48 PM

Commit

Screen Shot 2016-07-19 at 4.37.15 PM

  • 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.

Screen Shot 2016-07-19 at 4.38.02 PM

Working Tree and Index

Screen Shot 2016-07-19 at 4.41.29 PM

  • 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.

Screen Shot 2016-07-19 at 4.46.30 PM

GitLab

  • free for using private repository.
  • If you pay extra, you can get technical support as well.

Screen Shot 2016-07-19 at 4.48.39 PM

Citation

Images and most of words are from the website below

  • https://backlogtool.com/git-guide/en/

 

Leave A Comment

Your email address will not be published. Required fields are marked *