Git-flowWorkflow » History » Revision 7
« Previous |
Revision 7/16
(diff)
| Next »
Andreas Kohlbecker, 06/15/2015 12:19 PM
An efficient workflow for working with git flow¶
- Table of contents
- An efficient workflow for working with git flow
Setup¶
Setup git¶
You need to do this only once for your user account on a specific computer.
See also ...
git config --global branch.autosetuprebase always
Setup the currently project for use with git flow¶
yes "\n" | git flow init git branch -u origin/develop develop
Development workflow¶
Working on a branch¶
create a new feature branch¶
In the following example we will create a branch for fixing the issue #2778.
you can either use git flow for creating a new branch.
git flow feature start #2778
or use git directly:
git checkout -b #2778
The only difference of both is that git flow will create a branch with the prefix @feature/@.
For minor changes that only requite cone single commit you can in principle also directly work on the develop
branch.
Committing your work¶
review the changes you made so far¶
show the list of modified, new and deleted files
git status
eGit: open the Git Staging view
review the modification in the files:
unstaged files (whitespace changes ignored):
git diff -w
stages files (whitespace changes ignored):
git diff -w --cached
eGit: double click the files in Unstaged Changes, Stages Changes
stage files in the index¶
stage all files also new and remove deleted ones
git add -A .
stage specific files
git add {file}
interactive staging
git add --interactive
eGit: right click on the fiels in Unstaged Changes
commit the staged changes to the local git repo¶
git commit -m "commit message"
eGit: click Commit
WARNING: do NOT click on Commit and Push except you have a specific reason to do so!
Updated by Andreas Kohlbecker almost 9 years ago · 7 revisions