I just started using GIT yesterday and i was trying to do something but i think something went wrong somewhere . Let me explain my situation:
I started off with my working directory (master branch) looking like this
folder1 file1 file2 file3
I created another branch with the $ git checkout -b X command
After this , i went ahead and deleted all the files that were in the folder rm -r * and then added a few files in , so the working directory became so (this i think i wasn't supposed to do)
xFile1 xFile2
Then after some tests and after i arrived at the fact that the branch was stable .. i wanted to perform a merge and so i did
$ git checkout -b master $ git merge X
Now , after the merge , my directory (folder1) got removed . What i actually wanted was to bring xFile1 and xFile2 into the master branch.
I'm so confused with this , please help!