@@ -2,7 +2,7 @@ Git and Git Flow Cheat Sheet [
366- or
367- git push <remote> --delete <branch> (since Git v1.7.0)
400+ ```
401+ OR
402+ ```
403+ $ git push <remote> --delete <branch> (since Git v1.7.0)
368404```
369405
370406##### Publish your tags:
@@ -373,6 +409,16 @@ $ git push --tags
373409```
374410<hr >
375411
412+ #### Configure the merge tool globally to meld (editor)
413+ ``` bash
414+ $ git config --global merge.tool meld
415+ ```
416+
417+ ##### Use your configured merge tool to solve conflicts:
418+ ```
419+ $ git mergetool
420+ ```
421+
376422## Merge & Rebase
377423
378424##### Merge branch into your current HEAD:
@@ -397,11 +443,6 @@ $ git rebase --abort
397443$ git rebase --continue
398444```
399445
400- ##### Use your configured merge tool to solve conflicts:
401- ```
402- $ git mergetool
403- ```
404-
405446##### Use your editor to manually solve conflicts and (after resolving) mark file as resolved:
406447```
407448$ git add <resolved-file>
@@ -462,7 +503,7 @@ $ git reset --hard <commit>
462503
463504##### Reset your HEAD pointer to a remote branch current state.
464505```
465- git reset --hard <remote/branch> e.g., upstream/master, origin/my-feature
506+ $ git reset --hard <remote/branch> e.g., upstream/master, origin/my-feature
466507```
467508
468509##### Reset your HEAD pointer to a previous commit and preserve all changes as unstaged changes:
@@ -484,6 +525,7 @@ $ git commit -m "remove xyz file"
484525<hr >
485526
486527## Git-Flow
528+ Improved [ Git-flow] ( https://github.com/petervanderdoes/gitflow-avh )
487529
488530### Index
489531* [ Setup] ( #setup )
@@ -500,7 +542,7 @@ $ git commit -m "remove xyz file"
500542
501543##### OSX Homebrew:
502544```
503- $ brew install git-flow
545+ $ brew install git-flow-avh
504546```
505547
506548##### OSX Macports:
@@ -510,23 +552,28 @@ $ port install git-flow
510552
511553##### Linux (Debian-based):
512554```
513- $ apt-get install git-flow
555+ $ sudo apt-get install git-flow
514556```
515557
516558##### Windows (Cygwin):
517559###### You need wget and util-linux to install git-flow.
518- ```
519- $ wget -q -O - --no-check-certificate https://github. com/nvie /gitflow/raw/ develop/contrib/gitflow-installer.sh | bash
560+ ``` bash
561+ $ wget -q -O - --no-check-certificate https://raw.githubusercontent. com/petervanderdoes /gitflow/develop/contrib/gitflow-installer.sh install < state > | bash
520562```
521563<hr >
522564
523565### Getting Started
524566###### Git flow needs to be initialized in order to customize your project setup. Start using git-flow by initializing it inside an existing git repository:
525567##### Initialize:
526568###### You'll have to answer a few questions regarding the naming conventions for your branches. It's recommended to use the default values.
527- ```
569+ ``` shell
528570git flow init
529571```
572+ OR
573+ ###### To use default
574+ ``` shell
575+ git flow init -d
576+ ```
530577<hr >
531578
532579### Features
@@ -611,13 +658,13 @@ git flow hotfix finish VERSION
611658
612659### Commands
613660<p align =" center " >
614- <img alt="Git" src="./Img/git-flow-commands.png" height="270" width="460">
661+ <img alt="Git" src="./Img/git-flow-commands.png" height="270" width="460">
615662</p >
616663<hr >
617664
618665### Git flow schema
619666
620667<p align =" center " >
621- <img alt="Git" src="Img/git-flow-commands-without-flow.png">
668+ <img alt="Git" src="Img/git-flow-commands-without-flow.png">
622669</p >
623670<hr >
0 commit comments