Code hosting for version control and collaboration
1$ git config --global user.name 'John Wilson' // configure a global name to be used with your commits 2$ git config --global user.email 'email@example.com' // configure a global email address to be used with your commits 3$ git init // initialize new local git repository 4$ git clone URL // clone existing git repository in the current directory 5$ git add <filename> // Add file(s) to staging, * for all files in directory 6$ git status // list changed and staged files waiting for commit 7$ git commit -m "commit message" // write a useful and specific comment about the changes 8$ git merge <branchname> // merge a different branch into active branch 9$ git push // send changes to master branch with same name 10$ git pull // fetch and merge changes from master branch
When working alone there are many ways to manage files. However when collaborating with other developers on the same project it is important to be able to merge and resolve conflicts quickly and easily. Git allows a team to work together, track changes, branch off to work on new ideas and suggest changes with pull requests.
The terminal or command line is not as visually rich as a GUI, but it provides access to powerful commands. It requires fewer resources and common tasks can be faster to perform.
Programs like Tower include a graphical user interface to manage git repositories.