Professional Documents
Culture Documents
Merge Git
Merge Git
Merge Prune
F1a
F2a
F3a M
Commit 1 in Main (M)
MC1
M
F1a F1b M
F2a
F3a
Commit 2 in Main (M)
MC1 MC2
M
F1a F1b
F2a
F3a
Create New Branche “F” based on “M”
MC1 MC2
M M F
F
X
MERGE
Commit3 in F
MC1 MC2 FC1 FC2 MC3
M
F FC3
F3d
FC3 F
F3d
No new files!
Only Main moved ahead
If you delete F branch.. Only will be removed the pointer!
Real history represented
MERGE
Commit4 in F
F1a F1b F1c F1d
F2a F2b F2c F1e
F3a F3b F3c
M
MC1 MC2 FC1 FC2 MC3 MC4
FC3 FC4
F
F3d F1d2
Commit4 in M
F
F3d
F1d2
F2c
Possible new files! STAGE COMMIT F3d
Only Main moved ahead
Real history represented
Conflicts need to be solved
RESET HARD (don’t use in public branches)
F
F1c
F2c F1d2
F3d F2c
F3d
F
F1c
F2c F1d2
F3d F2c
F3d
Try to use it only in temporal local branches (not in main) avoiding broken references in other cloned repos.
REBASE (don’t use in public branches)
1C3C
MC1 MC2 FC1 FC2 MC3
7C45 M
F1c
F2c F FC3
F3d 6EA0
F M (s)
2252 XXXX
M
SQUASH (No public branches)
M F
M F
M F
M F
If Conflicts, git will not ask for merge.
Version picked will head
RESET soft
F1c F1d F1d F1e F1g F1h F1c F1d
F2c F2c F2c F2c F2c F2c F2c F2c
F3c F3c F3d F3d F3d F3d F3d F3c
M F
M F
F M
PRUNE remote branches during fetch (global Git option in vs)
F1d F1e F1f
Commit All
STAGE Workdir commited stash Workdir stage
F2c F2c F2d
commited stash stage F3d F3d F3e
F1e F1f F1f
F2c F2d F2d
F1d F1e F3e FC3 MC4 MC5
F3d F3e
F2c F2c F c9ee b09a xxxx
F3d F3d b09a xxxx
M F (s)
FC3 MC4 Stage F1 +Commit All
commited stash Workdir stage F1d
c9ee b09a commited stash Workdir stage F1e F1f
F2c F2c F2c
F1e F1f F1f
M F (s) F2c F2d F2c F2d F3d F3d F3d
F3d F3e
F3d F3e
commited stash Workdir
F FC3
stage xxxx MC4 MC5
b09a
F1e c9ee b09a xxxx
F2c
M (s)
F3d M F
F
b09a
commited stash Workdir stage
commited stash Workdir stage
F1d F1f
F1e F1f
F2c F2d
F2c F2d
F3d
F3d F3e M F3e
checkout
c9ee
F
b09a
STASH
commited stash Workdir stage
F1d F1e F1d F1f
F2c F2c F2c F2d
F3d F3d F3d F3e
F
c9ee
FC3 MC4
c9ee b09a
M F (s)
commited stash Workdir stage
F
b09a
commited stash Workdir commited stash Workdir stage commited stash Workdir stage
stage
F1e F1f F1d F1f F1d F1f
F2c F2d F2c F2d F2c F2d
Pop
F3d F3e F3d
F3d F3e F F F3e
checkout
F c9ee c9ee
b09a
DEVOPS - Organizations
Repo1
Repo2
RepoN
Team1
Organization Project
Team2
(1) (1)
TeamN
Repo1
Repo2
RepoN
Team1
Organization Project
Team2
(1) (1)
TeamN
Repo1
Project Repo2
(2) RepoN
Team1
Team2
TeamN
BEST PRACTICE DEVOPS – Branch Politics
Pending….
PULL REQUEST
CREATE A REPO FROM EXISTING SOLUTION
CLONE REPO
.BAT FILES
CLONE MANUALLY
.. REFERENCES.. RIGHT FOLDERS