Git is a version control system. For example, if you have a file on which you’ve been working on and reworking for a long time, all the versions of it are saved in Git, and you can easily get back to every version.
What is it for?
The version control system has the following benefits:
• You have access to all versions of all files in Git repository at any time, it’s almost impossible to lose any part of a code.
• Multiple developers can work on one project at the same time without interfering with each other, and without fear of losing any changes made by a colleague. In Git, the possibilities of collaborative work are unlimited.
Here is a list of some basic Git commands to get you going with Git.
|Git Task||Notes||Git Commands|
|Create a global repository||git init|
|To add files||Add one or more files to staging (index):||git add *|
|Commit||Commit changes to head (but not yet to the remote repository):||git commit -m "Commit message"|
|Push||Send changes to the master branch of your remote repository:||git push origin master|
|Status||List the files you've changed and those you still need to add or commit:||git status|
|Check out a repository||Create a working copy of a local repository:||git clone /path/to/repository|
|Tell git who you are||Configure the author name and email address to be used with your commits.||git config --global user.name "Sam Smith" git config --global user.email firstname.lastname@example.org|
As a developer it is important to know git commands and one should have a github profile.Be sure to sign up on GitHub or Bitbucket. These services offer great manuals on how to start working with remote repositories.GitHub is way ahead of bitbucket, and has turned into the standard and Mecca of the whole open source community.Hope this above post helped you.
Hope you enjoyed the above post
Top comments (0)