![]() ![]() This document shows the basic usage and effect of git-flow operations. Git flow provides excellent command line help and output.Read it carefully to see what’s happening… The macOS/Windows Client Sourcetree is an excellent git gui and provides git-flow support. ![]() Macports $ port install git-flow-avh Linux $ apt-get install git-flow Windows (Cygwin) $ wget -q -O -no-check-certificate install stable | bash Git flow works on macOS, Linux and Windows macOS You need a working git installation as prerequisite. You need wget and util-linux to install git-flow. Start using git-flow by initializing it inside an existing git repository: $ git flow init Create new git repo $ mkdir git-flow-helloworld $ cd git-flow-helloworld $ echo "# git-flow helloworld" > README.md $ git init $ git add README.md $ git commit -m "git-flow first commit" $ git remote add origin /git-flow-helloworld.git $ git push -u origin master Initialize git-flow Git flow needs to be initialized in order to customize your project setup. You’ll have to answer a few questions regarding the naming conventions for your branches. $ git flow init Which branch should be used for bringing forth production releases? - master Branch name for production releases: Branch name for "next release" development: develop How to name your supporting branch prefixes? Feature branches? Bugfix branches? Release branches? Hotfix branches? Support branches? Version tag prefix? Hooks and filters directory? Features It’s recommended to use the default values. Start developing a new feature with $ git flow feature start MYFEATURE Typically exist in developers repos onlyĭevelopment of new features starting from the ‘develop’ branch.Develop new features for upcoming releases. This action creates a new feature branch based on ‘develop’ and switches to itĪs an example: $ git flow feature start my-first-gitflow Switched to a new branch 'feature/my-first-gitflow' Summary of actions: - A new branch 'feature/my-first-gitflow' was created, based on 'develop' - You are now on branch 'feature/my-first-gitflow' Now, start committing on your feature. When done, use: git flow feature finish my-first-gitflow (base) Rasims-MacBook-Pro:git-flow-helloworld $ git branch develop * feature/my-first-gitflow master Finish up a featureįinish the development of a feature. This action performs the followingĪs an example for our hello-world repo # make some changes on the feature branch and push $ git add.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |