Git and Github

Git is an open-source version control tool, created in 2005.

GitHub is a company that creates tools to use git founded in 2008.

We use the terminal to create our git in the folder:

//the touch command doesn't work in windows

mkdir your_folder        //to create a folder
cd your_folder           //to move into a folder
cd ..                    //to exit a folder
git init                 //to start our git work

Any code of file will be added to the staging environment, we can check with git status:

Not yet in the staging

We can push local code to a GitHub repository:

We use Branches to test changes we can merge to the main code:

And even branches can be pushed to a GitHub repository.

When other branches are pushed a pull request opens, to check proposed changes and to solve code conflicts, a new repository branch will also open and can receive pushes even without a solved pull request.

We can then use git pull to set the repository code into our local machine.

more git commands:

Last updated