Get started with Git | InfoWorld

No matter what programming language you use, no matter what operating system you run, some software development tools are for everyone. Git falls squarely into that category. The open source distributed version control system gives every kind of developer all the power they need to manage the evolution of their code, and to experiment freely and non-destructively with their projects.

In this article we’ll walk through the basics of using Git: setting up a repository, working with local and remote repositories, and using features like branches and pull requests to manage workflow. Follow along, and see for yourself why Git has become by far the most popular choice for managing codebases, either for solo developers or development teams.

Downloading and installing Git

Setting up Git on one’s work system is different depending on what OS you run.

  • Linux: On some breeds of Linux, Git is installed by default. Otherwise, you can follow the installation instructions for your variety of Linux to set it up.
  • Windows: Git binaries for Windows can be downloaded from the official Git website. The portable or thumbdrive edition requires no installation—it unpacks into any directory where you have admin permissions—but will require you to add the ./bin subdirectory to your system PATH to work reliably.
  • MacOS: Mac users can install Git from HomeBrew with brew install git, or use the copy provide with Xcode.

Setting up Git

After you’ve confirmed Git is installed and available from the command line, the first thing you want to do with Git “out of the box” is configure it with your personal information. This allows all of your commits to be “signed” with that info.

To do this, you will use the git config command, like so:

PS D:Devreplicant> git config --global Thomas Anderson
PS D:Devreplicant> git config --global

Obviously, you will replace the username and user email with your own.

Source link

Leave a Comment

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