-
Notifications
You must be signed in to change notification settings - Fork 7
The basic workflow
The git is powerful and has a good control version. An example of version control is renaming the files, that is, we have on the same folder many versions of the same, like:
myfile.txt
myfile_18_02_03.txt
myfile_18_01_27.txt
myfile_18_01_16.txt
Where the myfile.txt is the newest. But it is ugly and difficult, that is, a bad version of control.
Using the same idea, we have the commits: every commit is a version.
There a representation that we call Basic Git Workflow and inside it we have 4 stages that we call:
- Working Directory
- Staging Area
- Repository
- Remote Repository
Only the last is Remote and the rest are Local. That means that only the fourth depend upon the internet and who acess the github.com will see only the last one.
The image below shows how the 4 stages.
Once you have the repository with the .git inside it, your repository is tracked by the git.
That means there are the 3 stages inside the repository: Working Directory, Staging Area, Repository
To understand about these 3 stages, we have an example. Let's suppose that we have 3 boxes:
- Box A means Working Directory
- Box B means Staging Area
- Box C means the commits already done
Imagine that you have the last version of myfile.txt in your last commit and you changed something inside it.
If you have just created a repository or cloned someone, your workspace is clean. If your workspace is clean, everything you see inside your folders is inside the Box C.
- Introdução
- Objetivo
- Instalando e configurando o necessário
- Basico
- Comparando
- Branching e Merging
- Rebase
- Stashing
- Tagging
- Links úteis
- Créditos
- Introduction
- Objective
- Installing and configuring the necessary
-
The basic
- Starting creating a new repository
- Joining in some existing repository
- Basic workflow
- Status, add, commit, pull and push commands
- Editing files, recursive add and backing out changes
- Renaming, moving and deleting
- History and versions
- Alias and Gitignore
- Comparing
- Working directory and Staging area
- Working directory and Git repository
- Staging area and Git repository
- Between commits
- Local and Remote master branches
- Branching and Merging
- Basic
- Fast Forward Merges
- Disable Fast Forward
- Automatic Merges
- Conflicting Merges
- Rebasing
- Stashing
- Tagging
- Usefull links
- Credits