alathrop
12/3/2017 - 6:55 PM

git rename

rename file from git bash


# <https://help.github.com/articles/renaming-a-file-using-the-command-line/>

# Open Git Bash.

# Change the current working directory to your local repository.

$ cd <desired directory>

# Rename the file, specifying the old file name and the new name you'd 
# like to give the file. This will stage your change for commit.

$ git mv old_filename new_filename

# Use git status to check the old and new file names.

$ git status

# Push the changes in your local repository to GitHub.

$ git push origin your-branch