Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
alexbrooklyn15087318dThank god my IDE has a local history for that
asgs9891318dYes, it is horrible and terrible. The Git book explains it in detail -
Though it looks too long to read, I believe the first half of article should be present in the basics section before teaching what git commands mean and do
But I learnt my lesson long ago to not keep huge chunks of changes in the working directory. Frequent commits (and pushes, of course) and small commits make the developer life a lot more manageable and disaster-recoveryable
donuts24410317dCan someone translate to non git terms?
Dunno what the diff is btwn reset n checkout...
I use GitExtensions... Just commit, pull, push, checkout and usually always at the HEAD of whatever branch im in.
math-silva2006315d@donuts in Git you have working and staging area. When you want to push something to the repository, you put the changes in the staging area before committing and pushing it to the repository. You use `reset` to remove something from the staging area, so, you don't want to commit this yet. You use checkout when you don't want the changes, so, it gets back to the version committed. Also, I'm not trying to be extensive here, but it's basically it.
@asgs finally read that page. Good recommendation except it didn't seem to work like that when I tried reset last week.
Somehow after a commit the whole local branch messed up... Said a whole bunch of files were now changed... But didn't.
Remote was fine though...
I tried reset --hard but it didn't do anything.
Then tried reverting all the "changes" and then manually downloaded and extracted the remote files over the working dir...
Which somehow added all the changes back.
Finally, Reverted again then switched to the main branch, did a pull then deleted the other branch and checked it out from remote.
This worked but isn't this was reset --hard was supposed to do and well how come overwriting didn't work either?
Only thing I can think of is the the Working dir tree got moved to like v1 somehow?
How do you check and move it back to the latest? Without basically doing a format and reinstall?