Being a git newbie, I have messed up a little bit in the way I handled a new development and I do not succeed in resolving this properly.
I have a master
branch.
I made a local copy of this master
branch on my desktop computer and then I removed the hidden .git
folder (don't ask me why).
I did quite some work on this local copy and I also updated the master
branch to resolve some bugs and pushed the changes.
Now I want to create a new branch new_version
for this new branch on which I worked locally.
Then I want to merge the modifications from master
into new_version
.
How can I do that ?
In my local branch I tried the following which ended up in a total mess:
git init
git pull my_repo master
So I reverted to the initital state where this local new branch was not even a git repository.
Assuming you mean that you made a local copy of the root folder and worked on it (without the .git directory), simply go back to the original directory and make sure you are up to date with
git pull
. Then, take your local copy and copy it over the original directory (making sure, again, that there is no .git directory in your copy). Then, simply commit your changes withgit add .
andgit commit
.