Git branch not working the way I expected it to -


in project master branch commit changes: git commit -a

create & switch new branch: git checkout -b newbranch

try stuff...

realize 'stuff' didn't work out way thought might switch master: git checkout master intent of moving along there... realize files added in newbranch still in textmate... so...

i type git status still see stuff thought i'd left in newbranch listed under "untracked files"

i try: git reset --hard take me last commit..but changes in newbranch still persist?!?

what missing?

what missing? well, files in questions untracked , git wouldn't touch ten-foot pole. ;)

in honestly, if weren't going commit there no reason checkout new branch.

you have tried new changes normal. if didn't saw wanted use new code later, have stashed it, so:

git stash save "some changes didn't work out." 

if absolutely wanted gone instead, had was:

git clean -d --dry-run 

and when sure:

git clean -df 

Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -