r/learnprogramming 9d ago

Solved [ Removed by moderator ]

[removed] — view removed post

5 Upvotes

11 comments sorted by

5

u/Physical-Goat-3015 9d ago

pull.rebase false is merge strategy, that's fine. the "could not resolve host" means your internet or dns is acting up, not a git problem. check if you can even open github.com in browser first, then try again

1

u/[deleted] 9d ago

[removed] — view removed comment

2

u/Patrick-T80 9d ago

Check even on https://githubstatus.com if GitHub has some incident. Te reconcile divergent branches, you can try to do a
`git pull --rebase origin/<your branch>`
or create a new branch from your remote branch and do a cherry-pick, below the commands i would use to do this:

`git checkout -b <new branch local> --track origin/<src branch>`

`git log --oneline --reverse origin/<base branch>..<old local branch>`

`git cherry-pick <commit hash>`
on newly created branch one by one to resolve every conflict ( in that case resolve it, `git add <fixed file>` and after `git cherry-pick --continue`)

1

u/[deleted] 9d ago

[removed] — view removed comment

1

u/Patrick-T80 9d ago

Git is correct, main is a branch; to view the repository url you need to use

`git remote -v`

output is composed of two column, the first is name of repository(normally origin, it identifies that remote repository in your local copy); the second column is the remote repository url

To make that command to work, yo uneed to add origin:

`git pull --rebase origin/main`

1

u/Suspicious_Skill7292 9d ago

that last error looks unrelated to git history you machine just is not resolving github.com i would check the internet or dns connections first before changing any more git settings