📘
Git-Help
Git Cheatsheet
  • A Simple Git Help
  • Basics
  • Git Branching
  • Pull Request
  • Submodules
  • Commands / Actions
    • Commit changes to other branch
    • git log
    • git status
    • git init
    • Amend a commit
    • Reset a file or full
    • Undo git add
    • Get remote repo url
    • Add or Set Remote URL
    • delete branch
  • Credits & Other
    • Other good links
    • Credits
Powered by GitBook
On this page

Was this helpful?

  1. Commands / Actions

Commit changes to other branch

PreviousSubmodulesNextgit log

Last updated 3 years ago

Was this helpful?

You can commit changes in different types.

Type 1:

git stash
git checkout otherBranch
git stash pop

Type 2:

git branch otherBranch
git checkout -m otherBranch

Type 3:

git checkout otherBranch
git add *
git commit -m

https://stackoverflow.com/questions/2944469/how-to-commit-my-current-changes-to-a-different-branch-in-git