Advanced use of git. Ugo Jardonnet. February 9, 2015 .... Get in touch with the guy who made the upstream change. If the issue is a thread of commits that all ...
Troobleshooting Edit commit in history Conflicts Things went bad Cancel Merge
4
References
Ugo Jardonnet
Advanced use of git
2 / 17
Making your life easier with git
Outline 1
Making your life easier with git
2
Merge and Rebase merge rebase [-i]
3
Troobleshooting Edit commit in history Conflicts Things went bad Cancel Merge
4
References
Ugo Jardonnet
Advanced use of git
3 / 17
Making your life easier with git
May the terminal help you Make your life easier Put branch name in your prompt Use aliases ∼/.gitconfig 1 [ color ] 2 ui = true 3 [ alias ] 4 co = checkout 5 ci = commit 6 st = status 7 br = branch 8 [ push ] 9 default = simple
Ugo Jardonnet
Advanced use of git
4 / 17
Making your life easier with git
git gui / gitk
git gui $ sudo apt-get install git-gui Review changes on HEAD Stage / unstage files or portions of file Amend last commit Commit / Push gitk $ sudo apt-get install gitk gitk : current branch history, cherry-pick commits, create branches/tags gitk –all : history of all branches gitk filename : history of a specific file
Ugo Jardonnet
Advanced use of git
5 / 17
Merge and Rebase
Outline 1
Making your life easier with git
2
Merge and Rebase merge rebase [-i]
3
Troobleshooting Edit commit in history Conflicts Things went bad Cancel Merge
4
References
Ugo Jardonnet
Advanced use of git
6 / 17
Merge and Rebase
merge
Merge $ git merge origin/master After Merging
Before
Reminder git pull means (master)$ git fetch origin # up-to-date origin (master)$ git merge origin/master # merge with origin/master
Ugo Jardonnet
Advanced use of git
7 / 17
Merge and Rebase
rebase [-i]
Rebase $ git rebase origin/master After Rebase
Before
Reminder A commit is identified by its hash. If the content, the author or the parent of this commit changed, the hash is changed
Ugo Jardonnet
Advanced use of git
8 / 17
Merge and Rebase
rebase [-i]
Interactive Rebase Interactive rebase allows you to specifies what you want to do with commits when applied to the target branch. git rebase -i origin/master
Ugo Jardonnet
Advanced use of git
9 / 17
Troobleshooting
Outline 1
Making your life easier with git
2
Merge and Rebase merge rebase [-i]
3
Troobleshooting Edit commit in history Conflicts Things went bad Cancel Merge
4
References
Ugo Jardonnet
Advanced use of git
10 / 17
Troobleshooting
Edit commit in history
How do I edit intermediate commits I pushed for review ? Do an interactive rebase and mark the commit for edition (master)$ git fetch (master)$ git rebase -i origin/master
Git will stop the rebase at this commit. You can now amend the current commit (master)$ git add ...# add edited files (master)$ git commit --amend ... # or with git gui (master)$ git rebase --continue # when you are done If anything goes wrong (master)$ git rebase --abort # everything after rebase started is cancelled Ugo Jardonnet
Advanced use of git
11 / 17
Troobleshooting
Conflicts
When I rebase to master I get too many conflicts Rebase regularly it should will be fine
Yes... but I still don’t manage to rebase... If the conflicts affect only one commit. We need to resolve them anyway. Get in touch with the guy who made the upstream change. If the issue is a thread of commits that all conflicts when rebasing. It means you spend too much time without pushing code or rebasing. See next subsection.
Ugo Jardonnet
Advanced use of git
12 / 17
Troobleshooting
Things went bad
I went to the point of no return. Please God help me !
Start over again from master with your modification unstaged (master)$ git fetch origin # update origin (master)$ git merge origin/master # get the latest changes (master)$ git reset --soft origin/master # reset to origin/master but keep modifications
Ugo Jardonnet
Advanced use of git
13 / 17
Troobleshooting
Cancel Merge
I merged by mistake. How to undo a merge.
Remove the merge commit (master)$ git reset --hard HEAD^ # reset branch to one commit before HEAD
Ugo Jardonnet
Advanced use of git
14 / 17
References
Outline 1
Making your life easier with git
2
Merge and Rebase merge rebase [-i]
3
Troobleshooting Edit commit in history Conflicts Things went bad Cancel Merge
4
References
Ugo Jardonnet
Advanced use of git
15 / 17
References
References
http://gitimmersion.com/ http://progit.org/ http://gitready.com/ http://book.git-scm.com/ and of course stackoverflow ...
Edit distance. Implementation. Python Implementation import numpy as np def levenshtein(s1, s2):. "Calculates the Levenshtein distance between a and b.".
Research engineer specialized in building large scale, state of the art, ML, NLP and CV systems. Skillset: ... Senior Computer Vision Engineer at Netgear (Paris, Fr / NYC, NY) ... Research Student at LRDE â EPITA R&D Laboratory (Paris, Fr).
Efficient computation of the singular value decomposition with applications to least squares problems. Technical Report CS-94-257, institut, Knoxville, TN, USA,.
Ugo Jardonnet. EPITA Research and Development Laboratory ... marketing. ⢠Products: Automation, telecommunication, healthcare, power generation and ...
The simplest explanation here is that the beam splitter has a 50% chance to transmit or reflect each photon. Ugo Jardonnet. Introduction to Quantum Computing.
Use concept of algebra (Set Theory, Complete lattices) and geometry (translation ... Classical Morphological Algorithm. Erosion. 1: function EROSION(f). 2:.
Aug 26, 2012 - The C++ programming language follows the zero-overhead principle [7] ... In C#, how do lambdas capture variables of their closure ? Python ?
mary, text to text and text to video alignment for automatic movie anno- ..... dog. Figure 3: Example a hypernym hierarchy. (later a concept may cover persons, ..... continue the path they 're following and he 'll go through this mystery passage.
21 févr. 2019 - vre évoque le cas français. La Marseillaise : Il y a des trajectoires étranges. Comment expliquez-vous que. Gilbert Collard, aujourd'hui député.
This document: http://arnaud.nauwynck.free.fr/CoursIUT/CoursIUT-IntroGIT.pdf ... http://en.wikipedia.org/wiki/Git(software) ... Clone (=Download) from GIT.
La première ligne ordonne à Git d'ignorer tout fichier se terminant en .o ou .a â des fichiers ...... Compression des objets: 100% (12/12), fait. Ãcriture des objets: ...
projet l'applique, les deux personnes reçoivent le crédit — l'écrivain en tant ...... prenant le fichier git-daemon-export-ok, de la même manière que le dae-.
Jun 1, 2012 - Delta compression using up to 4 threads. Compressing ... git commit --amend : add some file to a commit (staging area). Merge in Single ...
En fait, Git stocke tout non pas avec des noms de fichiers, mais dans la base de données Git ...... le caractère * car Git utilise sa propre expansion de nom de fichier en addition ...... Cette commande liste les étiquettes dans l'ordre alphabétique.
Méditations sur son ascendance, sa descendance. Étrangeté de ces échos de ...... et compatible avec toute chose, comme l'homme. Ainsi Teste, armé de sa ...
Je respire la fumée de nos cigares ... larges épaules, son être noir mordoré par les lumières, la forme de tout son .... Il me pria de venir fumer un cigare chez lui.
obstinÃment la tète vers le sol; et düs qu'un objet grossier excite leur convoitise, ils ...... marier les autres comme il veut, forme des liaisons de plaisir ou d'affaires ...
export GIT_PS1_SHOWDIRTYSTATE=1 GIT_PS1_SHOWSTASHSTATE=1 GIT_PS1_SHOWUNTRACKEDFILES=1. USER ... IFF. Prints a git logical variable : -l to list available var from index update all submodules .... GUI interactive mode.