-
Notifications
You must be signed in to change notification settings - Fork 3
Öykü Yılmaz Git Research
Have you ever heard about Git or GitHub? Do you ever wonder how Git stores all the versions of you work? Or have you ever lost time just because you made a mistake somewhere in your project and cannot find your old version of code? No worries, you can find the answers you need in this research.
Jump to:
- What is a Version Control System?
- What is Git
- Basic Commands
- Basic Terminology
- What do these commands do behind the curtains?
A version control system tracks the history of changes as people and teams collaborate on projects together. Everyone can find out an old version of the project. They also can answer these questions about a change: Who made it, when was it made, the comments of the developers when these changes were made.
From the definition of the official website of Git, "Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency."
Git lets developers see the entire timeline of their changes, decisions, and progression of any project in one place. Also, it is easy for developers to communicate through Git.
git init
- initializes a repository
git clone
- copies a repository from a remote source
git status
- gives you the status of your files in your repository
git add
- adds changes and creates a staging area
git commit
- commits your changes, creates an object and gives them an ID.
git branch branch_name
- creates a branch
git checkout branch_name
- makes your desired branch active
git push
- adds your local changes to the remote
git pull
- takes the updates from your remote
git merge
- combines two branches
When you type git init
, it creates a repository. That resembles the root if a tree:
When you git add
files, it creates a staging area like:
When you git commit
, you see that it gives this commit an id(it is A in the figure but normally it is a long hash, you can check Basic Terminology). Also your default branch(master in the figure) and head branch comes with you along your journey:
Then suppose you made a change and added this change. It creates another staging area on the top of your first commit:
And when you git commit
, the head and master branches come with you to your last commit. Also your commit has another id(in the figure it is B):
Now, if you want to make changes but you do not want to mess with your original files, you create a branch. Let's call it feature. The code for that is git branch branchname
. If you want to continiue with your new branch you need to git checkout branchname
. Or you can type(in this case of course) git checkout -b feature
to do both of the tasks in the same line:
So that you have a new branch, you can git add
your changed files:
When you git commit
, this time your selected branch(which is green) goes with this commit and your inactive branch(master, blue) stays where you leave it:
Now suppose you made some changes and added them and committed them three times:
git add files
git commit
git add files
git commit
git add files
git commit
Then your tree should look like this:
Now comes the good part, suppose you want to go back to the point where you left the master branch. All you need to do is git checkout master
. your master branch becomes active(green) and your feature branch becomes inactive. Remember, head follows you no matter which branch is selected:
You can git add files
and git commit
and your tree becomes:
And if you think that all changes are okay and you no longer need to seperate them, you can git merge
and ta-daa, all your changes merge to one last commit:
- Requirements
- Workspace Creation Scenario
- Application to a Workspace Scenario
- Follow Mechanism Scenario
- Design Documents
- Plan Documents
- Milestone Reports
- API Documentation
- Manuals
- Burak Ömür
- Halil Umut Özdemir
- Hasan Ramazan Yurt
- Öykü Yılmaz (Communicator)
- Ahmet Dadak
- Ertuğrul Bülbül
- Alperen Divriklioğlu
- Burhan Can Akkuş
- Hüseyin Can Bölükbaş
- Hilal Demir
- Umutcan Uvut
- Orkan Akisu
- Frontend Meeting #7 (19.01.2021)
- Frontend Meeting #6 (12.01.2021)
- Android Meeting #5 (08.01.2021)
- Frontend Meeting #5 (05.01.2021)
- Backend Meeting #6 (30.12.2020)
- Meeting #26 (29.12.2020)
- Meeting #25 (28.12.2020)
- Backend Meeting #5 (23.12.2020)
- Frontend Meeting #4 (21.12.2020)
- Android Meeting #4 (18.12.2020)
- Backend Meeting #4 (16.12.2020)
- Meeting #24 (15.12.2020)
- Meeting #23 (09.12.2020)
- Frontend Meeting #3 (10.12.2020)
- Android Meeting #3 (09.12.2020)
- Backend Meeting #3 (09.12.2020)
- Frontend Meeting #2 (08.12.2020)
- Android Meeting #2 (07.12.2020)
- Frontend Meeting #1 (03.12.2020)
- Android Meeting #1 (02.12.2020)
- Backend Meeting #2 (02.12.2020)
- Meeting #22 (25.11.2020)
- Meeting #21 (21.11.2020)
- Backend Meeting #1 (18.11.2020)
- Meeting #20 (17.11.2020)
- Meeting #19 (10.11.2020)
- Meeting #18 (30.10.2020)
- Meeting #17 (27.10.2020)
- Meeting #16 (24.05.2020)
- Meeting #15 (13.05.2020)
- Meeting #14 (10.05.2020)
- Meeting #13 (07.05.2020)
- Meeting #12 (30.04.2020)
- Meeting #11 (23.04.2020)
- Meeting #10 (17.04.2020)
- Meeting #9 (16.04.2020)
- Meeting #8 (09.04.2020)
- Meeting #7 (22.03.2020)
- Meeting #6 (12.03.2020)
- Meeting #5 (05.03.2020)
- Meeting #4 (28.02.2020)
- Customer Meeting #1 (28.02.2020)
- Meeting #3 (27.02.2020)
- Meeting #2 (20.02.2020)
- Meeting #1 (13.02.2020)
- Meeting Notes Template