Steps to create a new branch and push it to the remote repository
-
Create a new branch:
git checkout -b <branch>
-
Add the changes to the branch:
git add <file>
-
Commit the changes:
git commit -m "message"
-
Push the changes to the remote repository:
git push -u origin <branch>
Steps to merge a branch into the current branch
-
Switch to the branch you want to merge into:
git checkout <branch>
-
Merge the branch:
git merge <branch>
-
Push the changes to the remote repository:
git push
Steps to delete a branch
-
Delete the branch locally:
git branch -d <branch>
-
Delete the branch on the remote repository:
git push origin --delete <branch>