Question

Can anybody explain me about the difference between following two procedures:

  1. Creating a new branch from existing one in git & then Editing it followed by committing.
  2. Editing an existing branch & creating new branch before committing it & commit the changes in newly created branch.

M sure they are different, but exactly how, would like to find out.

Was it helpful?

Solution

There is no difference in the end result.

Changes which are in the working directory and changes staged in the index do not belong to a branch. When you create and switch to a new branch, your uncommitted changes are not touched.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top