If you are working on your project and ready to merge your release branch into master (production) then you can follow the below steps in git command line,
Step 1: Make sure your code is committed on your release branch, of the feature branch that you are going to commit to master.Step 2: Move current project to master branch
# git checkout master
Step 3: Merge your branch to master branch
# git merge release-branch
Step 4: Commit the branch into master branch
# git commit -a
βοΈThough we do not encourage to make use of the words master/slave as we really care about Diversity and Inclusion, this article is just for demonstration purpose and encourage everyone to make use of alternate words for repos like production/staging
More Posts related to Git,
- Change the default git branch name from master to main
- [Fixed] Git Clone git@github.com: Permission denied (publickey) Could not read from remote repository Fatal error
- [Solution] fatal: not a git repository (or any of the parent directories): .git
- [fix] zsh: command not found: git
- How to Install Git on Windows
- Setup Git + Visual Studio Code Tutorial
- How to undo last Git Commit on Local Repository?
- Install GitHub Command Line Tool on Mac
- How to Create a Git Branch in 6 Different ways
- Fix Git: Warning: could not find UI helper GitHub.UI on Windows
- Git Config Command - A Deep Dive
- Step-by-Step: How to delete a git branch from local as well as remote origin
- How to Add Git Bash Option to Windows Terminal List
- Command to Clone Repository Using Git Bash
- How to remove or unstage a file from git staged area
- Get the file location of git config values
- GitHub: How to Search Code
- How to check your installed version of Git
- Fix: error: src refspec master does not match any failed to push some refs to Git
- Git: Step-by-Step - How to Push Local Brach to GitHub
- How to Merge Branch into Master Branch
- fix fatal: --local can only be used inside a git repository error
- Fix: Git Pull Error: unable to resolve reference refs/remotes/origin/master: reference broken
- Change the default diff or commit editor for git
- Git Fix: fatal: refusing to merge unrelated histories Error
More Posts:
- Set Title to Android AlertDialog - Android
- PHP Script to Upload Images to Server - PHP
- How to Subscribe to AWS SNS Topic [SMS/Email/Lambda] via CLI - AWS
- How to Add Developer Tab in Excel for Mac - Microsoft
- How to know the Class Name and Path of a Runtime Java Object? - Java
- When to use of() and ofNullable() methods of Optional in Java? - Java
- [Solution] IntelliJ: Cannot find declaration to go to, Nothing here, Java file outside of source root Errors - Java
- How to check the version of NodeJS installed - HowTos