I have a new editor that I need to replace.
If in a branch I have some called EDITOR (folder with subfolders and files).
How do I replace the folder EDITOR with the new EDITOR - keeping same names.
I only want to commit and change this folder (and not other changes to other files).
I just want to force the new folder changes - hopefully al done at once.
I've just seen Lonnie's response and looks like we both understood something different. Please clarify your message if you needed something else so we can help you better! :)
Regards,
Ana
Hi Felipe! If my understanding is correct, you want to replace the existing folder with a new one, keeping the same old files inside the new one. Assuming that's what you want, it won't be possible to do that with Git, as that's not how Git works. I'm also assuming that you're using Git as it's the more widespread option and you didn't specify otherwise.
Git doesn't know about folders, in Git you can not have an empty folder for example. What Git "sees" is the file, if you change a file from one folder to another, Git will see that the name of the file was changed from oldfolder/file.txt to newfolder/file.txt. For Git, renaming a folder is to rename the path of every individual file inside it.
Having said that, this doesn't look like a Bitbucket question so I've moved it to the Git category where you'll be able to receive further explanations if you need them :)
Hope that helps!
Ana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Felipe, I am not sure I fully understand the situation. At first, I thought you might want to just rename the directory. This sounds like you want to replace the folder and its contents. I suggest the following:
git add --all
git commit -am "<commit message>"
git push
Hope this helps
Thanks
Lonnie
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.