-
Notifications
You must be signed in to change notification settings - Fork 8
Brief Git Guide
Ozgurcan Oztas edited this page Feb 24, 2019
·
1 revision
Git is a distributed version control system for tracking changes in source code of software projects. It is created by Linus Torvalds in 2005 and still maintaining by Junio Hamano. Most significant advantages of git is each directory in the file system is a full-fledged, trackable repository.
A brief explanation from the official website is given below.
The Git feature that really makes it stand apart from nearly every other SCM out there is its branching model.
Git allows and encourages you to have multiple local branches that can be entirely independent of each other. The
creation, merging, and deletion of those lines of development takes seconds.
This means that you can do things like:
-Frictionless Context Switching: Create a branch to try out an idea, commit a few times, switch back to where you branched from,
apply a patch, switch back to where you are experimenting, and merge it in.
-Role-Based Codelines: Have a branch that always contains only what goes to production,
another that you merge work into for testing, and several smaller ones for day to day work.
-Feature Based Workflow: Create new branches for each new feature you're working on so you can seamlessly switch back
and forth between them, then delete each branch when that feature gets merged into your main line.
-Disposable Experimentation: Create a branch to experiment in, realize it's not going to work,
and just delete it - abandoning the work—with nobody else ever seeing it (even if you've pushed
other branches in the meantime).
The commands below are organized to utilize git on your computer.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git
git --version
git --global global.user.name "your_name"
git --global global.user.email "your_email"
git init your_repository_name
git clone ssh://git@github.com/[your_username]/[your_repository_name].git
git status
git add /your/file/path/1 /your/file/path/2/etc
git add -A
git commit -m "[commit_your_message]"
git rm -r "[file_or_folder_name]"
git remote add origin your_github_repository_link_here
git push origin [your_branch_name]
git push -u origin [your_branch_name]
git push
git pull
git pull origin [your_branch_name]
git remote add origin ssh://git@github.com/[your_username]/[your_repository_name].git
git checkout commit_id
git branch your_branch_name
git checkout your_branch_name
git -d your_branch_name
For more information, check out the official website, Github, watch this video.
- Bahadır Hocamoğlu (Communicator)
- Baturalp Yörük
- Cemal Aytekin
- Ege Başural
- Elif Çalışkan
- Emre Demircioğlu
- Gürkan Demir
- İsmail Levent Baş
- Muhammed Bera Kaya
- Taha Eyup Korkmaz
İbrahim Özgürcan Öztaş
- Project Description
- Project Plans
- Questions and Answers about Project
- Requirements Analysis
- User Personas & Stories
- User Scenarios & Mockups
- Diagrams
- CmpE352
- CmpE451