GitHub is a web hosting service for version control using Git. It is mainly used for computer code. It provides every distributed version control and source code management functionality of Git. In addition, it has features of its own.
GitHub brings together the world’s largest community of developers to discover, share, and build better software.
A repository is just like a folder for your project. A repository contains all of your project’s files with each file’s revision history. It is a place where you can also discuss and manage your project’s work within the repository. In addition, you can own repositories individually, or you can share ownership of repositories with other people in an organization.
Cloning new Repository in GitHub
- Download and install source tree: https://www.sourcetreeapp.com/.
- Once downloaded, install it in your machine.
- After installation is complete, open source tree to clone new repository by clicking on File>Clone/New…
- Enter Git repository URL.
- Select the destination path of your system location, where you want to map repository at your local machine.
- Click on the ‘Clone’.
- You should see repository is cloned and mapped.
How to Pull, Push, and Commit using Source Tree?
- To pull the latest code from remote (Git) click on ‘Pull’ button from the menu.
- It will prompt popup as shown below. Select branch and click on the ‘OK’ button.
- Click on the ‘Commit’ button.
- All your changed files will show in unstage section.
- Select files from the unstage section and click ‘Stage selected’ button.
- You should see files moved in the stage section.
- Enter a comment in the comments section.
- Click on the ‘Commit’ button. You should see the commit number added in the Push button.
- Click on ‘Push’ button, it will prompt you popup, select branch and click on ‘Push’ button.
- Your code will automatically check-in in the repository.
You may also like: Commonly used Git Commands