#A bunch of changes not staged to commit
1 messages · Page 1 of 1 (latest)
currently on branch1
userTest/character-creation ?
yea
if you do git branch does branch2 show up?
yea
ok so... lkinda sounds like you didn't actually commit the parell sync stuff etc
I didnt
Right so
this is normal
if you checkout another branch with new files in the index
and didnt want to just wanted it in branch2 locally
bunch of chnages too much to copy/paste
uncommitted files just kind of "float". They're always there no matter what git shenanigans you do so you don't overwrite unsaved stuff
right but
did the branch checkout or no?
are you now on branch 2?
yea on branch2
ok so now
you can commit everything to branch 2
e.g.
git add .
git commit -am "Adding parellsync etc"
ahh so I needed to commit before switching back?
then if you git checkout branch1 it should be good
well it's just that the new files are just kinda going to float there, like Digi said, until you commit them somewhere
git doesn't want you to lose anything
so if you switch branches with uncommited files it's not going to delete them
if it did delete them, you'd lose them for good
if you just want them on branch 2, commit them to branch 2
tjen you can switch to branch 1 and they won't be there
btw the reason branch 2 didn't show in your .git/config is because you just haven't pushed it up to the remote repository yet
it's not a concern
right got that part
thanks guys that worked
appreciate it
ahhh hang on
now when I try to switch back I get this
Untracked files:
(use "git add <file>..." to include in what will be committed)
Assets/3rd Party/FishNet.meta
Assets/3rd Party/FishNet/
on which branch?
hmm what happened there
was fishnet committed to branch 2?
yes
not sure 🤔
if you checkout branch 2 fishnet is still there?
I wonder if Unity added the fishnet folder back through some editor script or something?
weird.... uhhh
im in branch1 and its in my 3rd party assets folder
ugh was running into somehting like this yesterday where it wouldnt let me delete certain folders until I removed the package from the package manager
also when swapping between branches can I leave the editor open?
Some packages kinda do that. They install stuff inside the asset folder
in normal circumstances, yes. But some packages make kinda sweeping changes the editor that might require an editor restart for example. Fishnet might be one of them (network frameworks are pretty invasive in general)
so for something like
a branch that has fishnet vs not, it's probably safer to close unity, switch, then reopen
jesus
its not letting me switch between branches because I guess I had fishnet in the first project at some point
this is driving me absolutely nuts how lousy this is
$ git checkout userTest/character-creation
error: Your local changes to the following files would be overwritten by checkout:
Assets/DefaultPrefabObjects.asset
Please commit your changes or stash them before you switch branches.
Aborting
damn yea its everytime I open the 2nd branch and try to switch back to the original branch it does this
kind of annoying