Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Move files & folders in github

Tags:

git

github

I need to set up a github for a school project but Im getting lost in the complicated workings of it.

I managed to push the contents of a folder to my repository but since I need to add other files and want to keep some structure I want to take the current files & folder I have and move them into a new directory.

For example, I want to change the following:

Master
  Folder X
  Folder Y
  File Z

To

Master
  Project 1
    Folder X
    Folder Y
    File Z

How do I do this exactly? I've found similar posts with similar explanations but I never understood any of them.. Could some please explain this in an easy fashion? Because I've been trying without success for nearly two hours now.

like image 767
TheAlPaca02 Avatar asked Jun 01 '14 10:06

TheAlPaca02


People also ask

How do I move files instead of copying?

You can move a file or folder from one folder to another by dragging it from its current location and dropping it into the destination folder, just as you would with a file on your desktop. Folder Tree: Right-click the file or folder you want, and from the menu that displays click Move or Copy.

How do I move items to a folder?

To drag-and-drop a file, highlight the files you want to move. Click any of them, and before you release the mouse button, move the mouse cursor until it is over the destination folder. Release the mouse button to move the files to this location.


1 Answers

Move files as you want in your local folder

and after that simply commit all changes in git bash:

git add "Project 1"
git commit -am "change folders layout"

and push changes:

git push
like image 193
griffon vulture Avatar answered Sep 30 '22 19:09

griffon vulture