I have a personal repository managed by git. In There, I have small project with tracked files I already commit and some untracked files I want to add in near future.
Those untracked files are in my local computer. I have no backup. I wonder if it is a good practice to create new branch for untracked files from my develop branch (I have master, develop and one per feature I am working on).
git checkout -b myuntrackedfiles develop
git add <files> (each untracked file)
git commit -m "Backup"
git push origin myuntrackedfiles.
Then when I want to incorporate one of those untracked files, I just copy them from untracked repository to desired branch
git checkout myfeature-nnn
git show myuntrackedfiles:myfile > myfile
git show myuntrackedfiles:myfile2 > myfile2
...
git commit -m "Adding untracked files"
git push origin feature-nnn
Finally, I can remove them from untracked branch
git checkout myuntrackedfiles
git reset --soft HEAD~1
git reset HEAD myfile1
git reset HEAD myfile2
git commit --amend
git push origin myuntrackedfiles
And delete locally the untracked files.
the question is: Exists a better and efficient way to do this process or this one is fine enough?