merge: thirsy - not something we can merge

Ever since I added my first new branch, I’ve been struggling to allow the same files to appear in both the master and thirsty branch.

First, I tried adding my hungry.py to be staged, but for some reason, it didn’t appear amongst the files to be staged:

01.PNG

So I proceeded to add them:

02.PNG

With those committed:

03.PNG

I tried adding hungry.py again on both the master and thirsty branches:

04.PNG

But it didn’t work, so I tried merging the branches:

05.PNG

In an attempt to get all of the files from the thirsty branch:

To also appear in the master branch of my repository, to no avail. The following image is what my repository looks like when I switch to the master branch:

What am I doing wrong?

1 Like

Hi @redskeleton007 

Ever since I added my first new branch, I’ve been struggling to allow the same files to appear in both the master and thirsty branch.

This is possible only if the same branch are related to the same history.

You can potentially see the branch with github like different paths where you can add and remove file without modify the other paths. When this paths merge into a unique one that the new branch ereditate all of the changes made previously.

First, I tried adding my hungry.py to be staged, but for some reason, it didn’t appear amongst the files to be staged:

01.PNG

This is because that file is already in the traked area and as long as you can’t do any changes the file remain in that state. If you try to change something inside that file then will be turn into a dirty stage and you can add it for a new commit.

But it didn’t work, so I tried merging the branches:

05.PNG

In an attempt to get all of the files from the thirsty branch:

To also appear in the master branch of my repository, to no avail. The following image is what my repository looks like when I switch to the master branch:

What am I doing wrong?

If you want the files of the thirsty branch into the master branch, the only thing you did wrong is the name of the branch you want to merge. If you pay attention at the name of the command you run to merge you can see that you use thursy instead of thirs t y.

From the master branch try to run this command:

git merge thirty

And all the changes are merged into master.

Ask for more questions…

-Gabriele-

Mark helpfull posts with Accept as Solution to help other users locate important info. Don’t forget to give Kudos for great contents!

1 Like