github - How exactly (with a diagram) does Git Fetch + Merge work? -


i'm attempting merge git repositories subfolders under 1 large repository. working fine, , doing:

git remote add -f <name> <url> git merge <name>/master 

however, after doing steps above, accidentally removed new files came remote. git-committed. wanted "add" them again, did git merge /master, nothing appeared, , console output, "already up-to-date". in mind, remote name/master, points github directory aka files want add; since local master branch pointing bunch of files missing remote files, can merge them , wah-lah. apparently i'm misunderstanding here..

i'm newbie this, think it'd super helpful have diagram pointers , such describing above steps do, , went wrong when deleted files?

appreciate insight!

your mistake wasn't removed new files (it can happen anyone), error new commit. when did that, local branch moved forward work, remote branches 1 commit behind. that's why new git merge didn't work (all repositories merged).

maybe, have undone last commit:

$ git commit ...(removed files) $ git reset --soft head~1 (undo last commit) 

see similar example:

enter image description here


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -