Tag: git fetch

Git: How to find whether origin/master is equivalent of (local) master?

git fetch goes over the network and fetches the latest snapshot from origin/master to the local host. It does not merge but just fetches the snapshot. Right after git fetch if we do git status, it will tell us whether (local) master is ahead or behind origin/master. All I want is a git command that […]

Pull a commit from a different repository

I’ve cloned a project for me to work on, but a friend made a change on the original project. I would like to pull the changes from that commit into my project. Using git fetch https://github.com/cvandermeer/wisemonkeys.git f70bcfd75a498ed9159b6e5313e306166fc3df62 throws the following error: error: no such remote ref f70bcfd75a498ed9159b6e5313e306166fc3df62 git remote -v gives me the following, origin […]

How does rebasing master on a “remote” local branch works?

I’m new to git, I’ve been following this tutorial. I think I understand most of it, until I got to remote repositories. The only concept about remote repositories I understood is git fetch and git remote. According to that tutorial, git fetch gets the remote repository from the specified url by the add option of […]

Temporarily using a different protocol with remote repository

I’ve on my laptop a git repository, and a remote repository on GiHub (a straight forward configuration created when running ‘git clone’). I’m using the SSH transfer protocol. i.e. remote address is: git@github.com:MyName/MyProg.git I’m now in a network environment where port 23 is blocked (As far as I can see, only ports 80 and 443 […]

Git svn fetch, rebase, reset and dcommit functions all hang with no error on one svn branch

I have a cloned repository of a large project with a somewhat non standard layout. Most of my branches work fine, but one of them doesn’t. Any git svn commands just hang and never complete or give errors. I’ve tried git reset, etc and nothing works. I can’t fetch, rebase or dcommit on the branch. […]

git fetch –unshallow gives :“fatal: –unshallow on a complete repository does not make sense” error

I am unable to git clone a remote repository using plain git clone path I get the error “The remote end hung up unexpectedly”. The complete msg I get is : Cloning into ‘xyzabc’… remote: Counting objects: 4328, done. remote: Compressing objects: 100% (3861/3861), done. select: Not enough memory2192/4328), 123.71 MiB | 164.00 KiB/s ffatal: […]

How do I fetch/pull multiple branches matching a wildcard string?

Goal: I have several repositories that are managed by the same rules. I would like to create a git alias to help fetch and/or pull only the relevant branches without fetching information for lots of remote branches relating to work I do not care about. I hope the end result will keep my log output […]

What if .gitignore ignore itself? Does it affect on “git fetch”?

Suppose this scene A git server of some sources codes and some elf binary files This server has no .gitignore file. I don’t know what new binary file will be added to the git server Every time i build the codes, it will create some new elf binary files. Since there is no .gitignore file, […]

Afraid git commit and push will accidentally overwrite changes

I am working on a project with a friend using a remote git tool bitbucket.org. So far that we have been working on the master branch at different times, and then commit and push those changes to the remote site for the other to use. Now he has committed and pushed his changes out to […]

How git-pull corporate with git-fetch (was: what does git-pull option `-p` mean)?

Sometimes I see at articles command: git pull -p But I do not found info about that in official documentation What does that option mean? UPD As noted by @torek the -p option is passed to git fetch. And -p here means: -p –prune Before fetching, remove any remote-tracking references that no longer exist on […]

Git Baby is a git and github fan, let's start git clone.