web programming - git basics
TRANSCRIPT
Internet Programming IIYildiz Technical University 2015
Using Git
Ömer Taşkın
OUTLINE
• What is git?
• Initializing git Repository
• git add
• git commit
• git push
• git pull
IP II - Git 2
What is git?
IP II - Git 3
Git is most known and best version control system.
Git provides:
• Versioning
• Source history & logs
• Working with development team etc.
Initializing Existing Repository
IP II - Git 4
We’ve git repository @github
git clone https://github.com/taskinomer/gittest.git
First step is clone to review or change. Git creates directory with project name.
git add
IP II - Git 5
We have git repository now on and want to store new files in git repository.
Create new file with name “test” and
git add test
or this command stashes all files
git add .
git commit
IP II - Git 6
We have created test file. But it's not in git repository yet. git commit command
provides to store sources locally.
-m option is commit message command. Every commit has to have a message!
git commit test -m "test commit"
git wants to know who am I (for only first commit)
git config --global user.name "username”
git config --global user.email "email"
git push
IP II - Git 7
It helps us to sending version to remote repository (in this case remote is github)
git push
git pull
IP II - Git 8
Gets changes from remote repository
git pull
QUESTIONS
IP II - Git 9