2. What is 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.
3. Why Git?
Branching and Merging
Small and Fast
Distributed
Data Assurance
Staging Area
Free and Open Source
4. Branching and Merging
multiple local branches
Frictionless Context Switching
Role-Based Codelines
Disposable Experimentation
5. Why Git?
Branching and Merging
Small and Fast
Distributed
Data Assurance
Staging Area
Free and Open Source
6. Small and Fast
Nearly all operations are performed locally
Git is written in C
7. Why Git?
Branching and Merging
Small and Fast
Distributed
Data Assurance
Staging Area
Free and Open Source
12. Why Git?
Branching and Merging
Small and Fast
Distributed
Data Assurance
Staging Area
Free and Open Source
13. Staging Area
intermediate area where commits can be formatted and reviewed
before completing the commit.
Now you can just stage the change you need for the current
commit and stage the other change for the next commit.
to ignore this feature if you don't want that kind of control — just
add a '-a' “git commit–a”
14. Installing GIT with android studio
Download Git from http://git-scm.com/downloads
Install git and And then
File > Settings > Version Control > Git
15. Installing GIT with android studio
VCS > Enable Version Control Integration > select "Git“
All files colors turned red
Select <project/file> > VCS > Git > Add to VCS
All files colors turned green
Select <project/file> > Commit
To work on android studio terminal put C:Program Files
(x86)Gitcmd into environment variables
16. Getting Started
First put
Your Identity
$ git config --global user.name “fathallah"
$ git config --global user.email fathallah@asyad.com
--global means that this user name will be used for all projects
$ git config –list for check your settings
$ git help to
17. Getting Started
Getting a Git Repository
$ git init to Initializing a Repository in an Existing Directory
Add New Files and commit
“$ git add *.c”
“$ git commit -m 'initial project version‘”
Cloning an Existing Repository “ git clone [url]”
For cloning in specific folder “ git clone [url] [folder name]“
25. Fetching and Pulling from Your
Remotes
$ git fetch [remote-name]
get all work from repo and you have to merge it manually
$ git pull
get all work from repo and merge it
26. Pushing to Your Remotes
$ git push origin master
git push [remote-name] [branch-name]
27. Branching and Mergeing
http://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-
and-Merging
28. BitBucket vs Github
Open-source projects
Public and private Projects
Switch between the two
Pricing