fatal: ‘origin’ does not appear to be a git repository

$HOME/.gitconfig is your global config for git. There are three levels of config files. cat $(git rev-parse –show-toplevel)/.git/config (mentioned by bereal) is your local config, local to the repo you have cloned. you can also type from within your repo: git remote -v And see if there is any remote named ‘origin’ listed in it. … Read more

Can’t push to GitHub because of large file which I already deleted

You can use git filter-branch –index-filter ‘git rm -r –cached –ignore-unmatch <file/dir>’ HEAD This will delete everything in the history of that file. The problem is that the file is present in the history. This command changes the hashes of your commits which can be a real problem, especially on shared repositories. It should not … Read more

Issue pushing new code in Github

If this is your first push, then you might not care about the history on the remote. You could then do a “force push” to skip checks that git does to prevent you from overwriting any existing, or differing, work on remote. Use with extreme care! just change the git push **-u** origin master change … Read more

Git push branch from one remote to another?

I’ve found this one: git push rorg ‘refs/remotes/korg/*:refs/heads/*’ And it pushed all my remote branches from korg to rorg (even without local copies of the branches). See the output below: Counting objects: 293, done. Delta compression using up to 4 threads. Compressing objects: 100% (67/67), done. Writing objects: 100% (176/176), 48.32 KiB, done. Total 176 … Read more

What does git push origin HEAD mean?

HEAD points to the top of the current branch. git can obtain the branch name from that. So it’s the same as: git push origin CURRENT_BRANCH_NAME but you don’t have to remember/type the current branch name. Also it prevents you from pushing to the wrong remote branch by accident. If you want to push a … Read more