I have an installation of a website with lots of subfolders like logs/
, useruploads/
,... that I don't need to track with Git.
I created a git repository on the server locally with
git init
echo 'userupload/*'>>.gitignore
echo 'logs/*'>>.gitignore
#....
git add .gitignore
git commit -a -m "initial .gitignore"
git add *
git comit -a -m "initial rest"
The only branch in this repo is called master
, but I would like to rename it to release
.
All solutions for renaming my master
branch to release
suggest to:
- checkout
master
- rename it locally
- and delete the old one
But this approach would cause me to lose all untracked files in my Git folder. Surely, there is a better approach... What should I do?