Quick to understand git step by step. Git is a version control system that is used for software development and other version control tasks. As a distributed revision control system it is aimed at speed, data integrity, and support for distributed, non-linear workflows. Git was created by Linus Torvalds in 2005 for development of the Linux kernel, with other kernel developers contributing to its initial development. Its current maintainer is Junio Hamano. (Source: wikipedia)
In this tutorial, we need to explain simply tutorial to understand how to use .git
- Create a project folder on your computer.
- Create a new repository on github/bitbucket/gitlab or else.
- Log into your project folder and type git init to create initial .git
$ git init
- Remote repository that you created.
$ git remote add origin [email protected]:your_username/yourproject.git
- Adding all your project to .git, also learn about: .gitignore
$ git add .
- Commenting commit that you add it before uploading.
$ git commit -m "Your comment"
- Push / uploading all your project to the master project that is in the repository.
$ git push -u origin master
- Checking all your project version
$ git tag
- Adding the new version.
$ git tag -a v1.0 -m 'Initial launch v1.0'
- Uploading the new version that you created.
$ git push origin v1.0
- Removing version that have been uploaded (this is usually when you has a small errors in the project, but you wan’t to create a new version again).
$ git push --delete origin v1.0
- Removing version / tag on your local (and then do the step number 8).
$ git tag --delete v1.0
Tutorial above is just a quick way to use and understand the .git. This way is often done when you work with .git and without collaboration. There are still many other ways besides that we explained above.
posted 1 year, 2 months ago