start new feature with git
start a new feature with git is:
- [optional] start a new branch
make new local branch, from starting point(e.g. main), and switch to it
git branch main git branch new-feature git checkout new-feature
magit:
b l (magit-branch-checkout) new-feture main
- stage, commit and push on that branch to make that new feature
[when in collaboration/when doing multiple features the same time] when somebody else’s work/some other feature is done, and you’d like to use it in the feature/see compatibility, pull() them.
git fetch origin # if with remote repo and somebody else's working on it git checkout new-feature # make sure you are on the branch with your feature git merge another-branch # pull in new commits from another-branch
magit:
b b (magit-checkout) new-feature
andm m (magit-merge) other-branch