git rm -r --cached . git add . git commit -m "fixed untracked files"
After some time, I have many local branches still exist. Just delete them all with this simple command :
$ git branch | grep -v "master" | xargs git branch -D
This command is for delete your local git branches and keep only for master branch.
move to another branch
git checkout your-branch
hard reset branch
git reset --hard origin/master
create new branch
git checkout -b new-branch
delete local branch
git branch -D your-branch
merge from develop to master
git merge develop
init on existed project and push master for the first time
git init git remote add origin ssh://email@example.com/your-username/your-repo.git git add . git commit -am "initial commit" git push -u origin master