Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
## VH Git Process
1. Get Status
1. `git status`
2. Check what branch you're on
1. `git branch`
3. Add all files
1. `git add .`
4. Create Branch with with ticket name and small description
1. `git checkout -b VHMN-3965-helpful-cunsumer-review-button`
5. Commit changes
1. `git commit -m 'Added Helpful/Unhelpful button functionality with Vuex store tests'`
6. Push changes to your branch
1. `git push origin VHMN-3965-helpful-cunsumer-review-button`
2. If error
3. `git push origin VHMN-3965-helpful-cunsumer-review-button --force`
7. Go to Github and Create Pull Request with release/next
### Merging
1. `git merge origin/release/next`
2. add, commit, then push to your branch
3. `git push origin update-css`
### Delete Git Branch
1. Delete a local branch GIT branch
1. `git branch -d branch_name`
1. The -d option stands for --delete, which would delete the local branch, only if you have already pushed and merged it with your remote branches.
2. `git branch -D branch_name`
1. The -D option stands for --delete --force, which deletes the branch regardless of its push and merge status, so be careful using this one!
2. Delete a remote GIT branch
1. `git push <remote_name> --delete <branch_name>`
3. Remove all your local git branches but keep master
GIT
Sometimes after a sprint, all the remaining branches are just taking up space.
Here's a small snippet to remove all your local branches in one go.
1. $ `git branch | grep -v "master" | xargs git branch -D `
### Create Branch to another Branch
1. `git checkout -b VHMN-4561-convert-featured-links-to-dumb-component origin/feature/compare-pages-redesign`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.