Skip to content

Instantly share code, notes, and snippets.

@choyan
Last active October 6, 2020 22:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save choyan/c5535bf9e73cd6aec6ca69e17ff9d3d2 to your computer and use it in GitHub Desktop.
Save choyan/c5535bf9e73cd6aec6ca69e17ff9d3d2 to your computer and use it in GitHub Desktop.

Git Workflow

Initialize Git

git init
git add .
git commit -m 'new commit'

Create branch

git branch develop
git checkout develop (any branchname will shift to that branch)

or

git checkout -b developer

Manage branch

  • After completing some tasks we will commit our work.
  • Then we will again checkout to master and get the latest work and move back to develop branch again.
git checkout master
git pull origin master
git checkout develop
  • Now we will merge the master branch with the develop branch.
git merge master
  • Now lets push the develop branch to Github.
git push origin develop
  • A pull request will be created there. Lets tag them properly there to complete the automation.

Old docs

git merge --no-ff feature-branch (to merge to develop from its child branch)
git merge --no-ff develop
git merge --no-ff release-1.2
Merge made by recursive.
(Summary of changes)
git tag -a 1.2.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment