Moving and Renaming Files on GitHub
Starting today, you can move and rename files within your repositories on GitHub. Renaming a file You’ll notice that editing a file now lets you enter a new name for…
Starting today, you can move and rename files within your repositories on GitHub.
Renaming a file
You’ll notice that editing a file now lets you enter a new name for your file.
But let’s see what else this field can do.
Moving files to new locations
You can also move files to entirely new locations using just the filename field.
To navigate down into a folder, just type the name of the folder you want to move the
file into followed by /
. The folder can be one that’s already part of your repository,
or it can even be a brand-new folder that doesn’t exist yet!
It’s just as easy to move files into folders above the file’s current location too.
To move a file up, place your cursor at the beginning of the filename field and either:
- Type
../
to jump up a whole directory level. - Press
backspace
to move up a directory, while keeping the parent folder’s name
around for quick changes.
Creating files in new locations
This functionality is also available when
creating files too, and means
you can now create new files anywhere in your repositories, even if the folder doesn’t
exist yet!
Help and further information
For help with these features, be sure to read our help articles on renaming,
moving, and
creating files.
Written by
Related posts
Students: Start building your skills with the GitHub Foundations certification
The GitHub Foundations Certification exam fee is now waived for all students verified through GitHub Education.
Announcing GitHub Secure Open Source Fund: Help secure the open source ecosystem for everyone
Applications for the new GitHub Secure Open Source Fund are now open! Applications will be reviewed on a rolling basis until they close on January 7 at 11:59 pm PT. Programming and funding will begin in early 2025.
Software is a team sport: Building the future of software development together
Microsoft and GitHub are committed to empowering developers around the world to innovate, collaborate, and create solutions that’ll shape the next generation of technology.