Git2 is a version control system (VCS) where files can be accessed quickly. In the case for Heroku, users will have a local copy of all the application files that is being launched in Heroku. This makes it easy to deploy the application quickly and to identify which files are for a particular version.
Example 1 on use of Git on Heroku applications
Pull files from an existing repo.
> git clone https://git.heroku.com/intense-fortress-90999.git
> cd intense-fortress-90999
Creating a branch and switch to branch
> git branch chatbot1
> git checkout chatbot1
> git status
> git commit -a -m 'made other changes'
Here is a typical process on a folder for use with Git.
# Initialise Git repository $ git init # Identify status and which files are being track or untracked. $ git status # Add all files to the repository $ git add .
Example 2 to Clone files from github. In Udacity's Android courses, there is a Project named Sunshine that have its source codes in github.
(on a MS Windows 10)
Create a new folder to store the whole Sunshine project as a sub folder. Right click and choose "Git bash here". Type
git clone https://github.com/udacity/Sunshine-Version-2.git
Tip: to use the project files, get the Weather map activation keys from openweathermap.org