Skip to main content

Git


Git for version control

What is version control ?

Version control systems are a category of software tools that help a software team manage changes to source code over time. Version control software keeps track of every modification to the code in a special kind of database. If a mistake is made, developers can turn back the clock and compare earlier versions of the code to help fix the mistake while minimizing disruption to all team members.

Software developers working in teams are continually writing new source code and changing existing source code. The code for a project, app or software component is typically organized in a folder structure or "file tree". One developer on the team may be working on a new feature while another developer fixes an unrelated bug by changing code, each developer may make their changes in several parts of the file tree.

Version control helps teams solve these kinds of problems, tracking every individual change by each contributor and helping prevent concurrent work from conflicting. Changes made in one part of the software can be incompatible with those made by another developer working at the same time. This problem should be discovered and solved in an orderly manner without blocking the work of the rest of the team. Further, in all software development, any change can introduce new bugs on its own and new software can't be trusted until it's tested. So testing and development proceed together until a new version is ready. 


Install Git on Windows

Git for Windows stand-alone installer

  1. Download the latest Git for Windows installer.
  2. When you've successfully started the installer, you should see the Git Setup wizard screen. Follow the Next and Finish prompts to complete the installation. The default options are pretty sensible for most users.
  3. Open a Command Prompt (or Git Bash if during installation you elected not to use Git from the Windows Command Prompt).
  4. Run the following commands to configure your Git username and email using the following commands, replacing Emma's name with your own. These details will be associated with any commits that you create:
    $ git config --global user.name "git user"
    $ git config --global user.email "gituser@company.com"
     
  5. Optional: Install the Git credential helper on Windows
    Bitbucket supports pushing and pulling over HTTP to your remote Git repositories on Bitbucket. Every time you interact with the remote repository, you must supply a username/password combination. You can store these credentials, instead of supplying the combination every time, with the Git Credential Manager for Windows.

Install Git with Atlassian Sourcetree

Sourcetree, a free visual Git client for Windows, comes with its own bundled version of Git. You can download Sourcetree here.


Install Git on Linux

Ubuntu (apt-get)

Git packages are available via apt:
  1. From your shell, install Git using apt-get:
    $ sudo apt-get update
    $ sudo apt-get install git
     
  2. Verify the installation was successful by typing git --version:
    $ git --version
      git version 2.9.2
     
  3. Configure your Git username and email using the following commands, replacing Emma's name with your own. These details will be associated with any commits that you create:
    $ git config --global user.name "Git User"
    $ git config --global user.email "gituser@company.com"

 Git Commands








Comments

Popular posts from this blog

HTTP Server : Apache

Apache is a open source HTTP web server. It handles HTTP Requests sent to it and then it is able to them. Apache is comprised of Two main building Blocks with the Latter being comprised of many other little building blocks. The Building Blocks are the Apache Core and then the Apache Modules that in a sense extend the Apache core. What is a Web Server?  A Web Server is any Machine that receives requests from a client machine and is able to turn around process the requests and send back a response. This is usually in terms of a Web Server to send back a Web pages when people what to go navigate to a webpage that is hosted on that server now one may ask how do you send and receive the information to and from the server. This is where HTTP begins to play a role into how this all goes about. What is HTTP? HTTP Protocol: HTTP stands for H yper- T ext- T ransfer- P rotocol This is the protocol that is used in order to send and receive information from the server. This is...

Web technology

The open nature of the World Wide Web presents incredible opportunities for people who want to create websites or online applications. To take full advantage of the web's capabilities, you need to know how to use them. Web technologies   Basics HTML HyperText Markup Language (HTML) is used to describe and define the content of a webpage. CSS Cascading Style Sheets (CSS) are used to describe the appearance or presentation of content on a webpage. HTTP Hypertext Transfer Protocol (HTTP) is used to deliver HTML and other hypermedia documents on the web. Scripting JavaScript JavaScript is the programming language that runs in your browser. You can use it to add interactivity and other dynamic features to your website or application.