Git and GitHub
Pour un tutoriel détaillé
https://code.tutsplus.com/tutorials/working-with-git-in-
android-studio--cms-30514
Nous avons tous été ici ...
Problèmes
• plusieurs versions c o n flits
• plusieurs contributeurs
• ...
Git + Github
un meilleur flux de travail
git
git est un système de contrôle de
version distribué open source
conçu pour la rapidité et l'efficacité
installer git
http://git-s c m.c o m/do wn lo ads
Git in Android Studio
Git in Android Studio
Git in Android Studio
Git in Android Studio
Git in Android Studio
Git in Android Studio
Git in Android Studio
Git in Android Studio
1.Click this icon to refresh the status of your files in the current workplace.
2.This icon when clicked will commit your current changes.
3.Click this icon to roll back any selected changes.
4.Click this icon to create a new changelist.
5.Click this button to delete the selected changelist.
6.To make a changelist active, simply click this icon.
7.To move a selected file to another changelist, click this icon.
Git in Android Studio
Git in Android Studio
VCS > Git > Push
OR
VCS > Git > Pull
OR
Git Commands
• Creating New Repo
$ git init
• Committing
$ mkdir projet
• Branching/Merging
$ cd projet
• Cloning a Repo $ git init
• Updating
Git
• Creating New Repo
$ git init
• Committing
$ mkdir projet
• Branching/Merging
$ cd projet
• Cloning a Repo $ git init
• Updating
Git Commands
$ cd ..
$ touch testfile.md
• Creating New Repo
• Committing $ git status
• Branching/Merging
• Cloning a Repo
branch name
• Updating
staging area
Git Commands
• Creating New Repo
$ git add <filename>
• Committing $ git status
• Branching/Merging
• Cloning a Repo
• Updating
staging area
Git Commands
• Creating New Repo
$ git commit
• Committing $ git status
• Branching/Merging
your commit msg
• Cloning a Repo
• Updating
Git Commands
• Creating New Repo
$ git branch lis t of branc hes
• Committing
• Branching/Merging
$ git branch <branchname> new branc h
• Cloning a Repo
$ git checkout <branchname> s witc h
• Updating
Git Commands
• Creating New Repo
$ git merge <branchname> merge branc hes
• Committing
• Branching/Merging
• Cloning a Repo
• Updating
branch merge
GitHub
• Creating New Repo create an account
• Committing www.github.c o m/edu
• Branching/Merging
• Cloning a Repo
• Updating
GitHub
• Creating New Repo $ git clone <url> <name>
• Committing
https ://github.c o m/jblo mo /datamin ing290
• Branching/Merging
• Inspection
• Cloning a Repo
• Updating
GitHub
• Creating New Repo Fork a repo
• Committing
• Branching/Merging
• Inspection
• Cloning a Repo
• Updating
GitHub
• Creating New Repo
• Committing $ git fetch
• Branching/Merging $ git merge
• Inspection
$ git pull
• Cloning a Repo
• Updating $ git push