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
Celebrating the GitHub Awards 2024 recipients 🎉
The GitHub Awards celebrates the outstanding contributions and achievements in the developer community by honoring individuals, projects, and organizations for creating an outsized positive impact on the community.
New from Universe 2024: Get the latest previews and releases
Find out how we’re evolving GitHub and GitHub Copilot—and get access to the latest previews and GA releases.
Bringing developer choice to Copilot with Anthropic’s Claude 3.5 Sonnet, Google’s Gemini 1.5 Pro, and OpenAI’s o1-preview
At GitHub Universe, we announced Anthropic’s Claude 3.5 Sonnet, Google’s Gemini 1.5 Pro, and OpenAI’s o1-preview and o1-mini are coming to GitHub Copilot—bringing a new level of choice to every developer.