Linked Questions

-2 votes
1 answer
1k views

I have clone the remote repo to local machine. git clone https://my_name/repo/project.git Now the local repo has 1 master branch while remote repo has 10-15 branches. git branch -a *master *remotes/...
AkiZukiLenn's user avatar
204 votes
14 answers
86k views

I need to delete old and unmaintained branches from our remote repository. I'm trying to find a way with which to list the remote branches by their last modified date, and I can't. Is there an easy ...
Roni Yaniv's user avatar
  • 60.6k
333 votes
7 answers
72k views

To store the output of a command as a variable in sh/ksh/bash, you can do either var=$(command) or var=`command` What's the difference if any between the two methods?
hhafez's user avatar
  • 39.9k
330 votes
4 answers
286k views

Does anybody know the difference between these two commands to switch and track a remote branch? git checkout -b branch origin/branch git checkout --track origin/branch I think both keep track of the ...
yorch's user avatar
  • 7,366
67 votes
5 answers
43k views

When you fork a repository on github your forked repo contains all branches and tags. Over time these branches and tags gets outdated. How does one as easy it is with fork make sure your fork has ...
Max Rydahl Andersen's user avatar
30 votes
3 answers
51k views

I am new to Git and trying to wrap my head around the way branches work. According to the documentation, git checkout: Updates files in the working tree to match the version in the index or the ...
user3282276's user avatar
  • 3,824
55 votes
4 answers
90k views

How do I pull all of the remote branches to my own repository? If I type: git branch -a I get a long list of branches, but if I type: git branch I see only two of them. How do I pull all branches ...
MarcinWolny's user avatar
  • 1,641
45 votes
6 answers
18k views

I've set up tracking branches with the --track option, and when I do a git pull on master, it fetches all branches to origin/branchname but doesn't merge with the local tracking branches. This is ...
Chetan's user avatar
  • 48.4k
18 votes
2 answers
54k views

I'm stil learning git and not sure how some basic things work. I created a local branch by doing: git branch AppStore I can't remember exactly how I pushed this branch to github.com, but I can see ...
Crystal's user avatar
  • 29.7k
20 votes
3 answers
47k views

I forked a repo from Github. On doing git remote -v it displays: origin https://github.com/myusername/moodle.git (fetch) origin https://github.com/myusername/moodle.git (push) upstream https://...
xan's user avatar
  • 4,726
13 votes
3 answers
16k views

I have 2 branches in my local, for example: FirstApp SecondApp How to push both of them to remote repo? Do I also need to create two branches in remote as well? Many thanks!
Rendy's user avatar
  • 5,718
21 votes
1 answer
31k views

I have a project with a handful of submodules. Many of them are cloned from a GitHub fork to which I've added a branch for my custom mods. A typical setup is like thus: In local folder: MyProject1/...
Quinn Frederick's user avatar
20 votes
2 answers
2k views

Say you have a scenario with a central master git repository, which developers and CI-engines clone from. I.e. very close to a traditional non-distributed version control system setup, with a central ...
Thorbjørn Ravn Andersen's user avatar
10 votes
2 answers
10k views

I can say this: git push --all origin and it will push all branches to origin. But if I do this: git pull --all origin then it doesn't pull all the branches from origin, it just returns an error: ...
Incerteza's user avatar
  • 35.5k
9 votes
2 answers
8k views

I have 2 github accounts A company one and a personal one I use cygwin to manage my ssh keys and connect to Github Everything works fine In IntelliJ when using the corporate account since it uses ...
Stephane Rainville's user avatar

15 30 50 per page