Linked Questions

5832 votes
21 answers
6.8m views

How do I: Create a local branch from another branch (via git branch or git checkout -b). Push the local branch to the remote repository (i.e. publish), but make it trackable so that git pull and git ...
Roni Yaniv's user avatar
  • 60.6k
2076 votes
25 answers
1.4m views

I create a new branch in Git: git branch my_branch Push it: git push origin my_branch Now say someone made some changes on the server and I want to pull from origin/my_branch. I do: git pull But I ...
Ram Rachum's user avatar
  • 89.5k
900 votes
17 answers
471k views

The short: is there a way to have a git repo push to and pull from a list of remote repos (rather than a single "origin")? The long: I often have a situation when I'm developing an app in multiple ...
Zorzella's user avatar
  • 9,101
608 votes
6 answers
860k views

What does git --set-upstream do? I tried to understand it by reading the git manual, but I didn't quite get it.
Евгений Масленков's user avatar
244 votes
8 answers
292k views

I'm more of a novice when it comes to advanced operations in git. I maintain my blog using the blogging framework Octopress. Though Octopress is not under any development since 2011, it serves my ...
Jatin Ganhotra's user avatar
207 votes
8 answers
218k views

I am new in git and I am practicing. I created a local branch but I saw that when I did git push my branch was not uploaded to the repository. I had to actually do: git push -u origin --all. Why is ...
Cratylus's user avatar
  • 54.3k
0 votes
2 answers
8k views

For an interview I was asked to refactor an existing project. From the github repository I was given, I was told to: Create a new branch, make updates, commit changes, push to new branch. Then I was ...
Ozark19's user avatar
  • 138
6 votes
2 answers
5k views

I have a master branch and am working on 2 features which involve the same files. I want to have 2 local branches pointing to the same upstream master but have different changes. I don't want to ...
Swarnim Raj's user avatar
1 vote
2 answers
4k views

I a very very beginner with git. I've read that git push --set-upstream origin master must be executed only once - when repo is empty. However, I forgot and pushed with --set-upstream origin master ...
user avatar
0 votes
3 answers
2k views

I want to backup my project, so I have tried initializing a rep with git init and then commit all files with git add . git commit -am "first commit" and now I want to push it to a repository (which ...
Jamgreen's user avatar
  • 11.2k
1 vote
1 answer
3k views

I got an issue with my repository but i have no solution to resolve it. Please correct me. I created a repository on bitbucket, cloned it and got message "You appear to have cloned an empty ...
Nhat Lich's user avatar
2 votes
1 answer
3k views

Before pulling from remote, I'm always making sure that I don't have local commits to avoid conflicts. However, I have experienced this: admin@localhost ~/home (master) $ git status # On branch ...
Jok's user avatar
  • 23
6 votes
2 answers
1k views

I've currently set up my git remote to restrict which branches are fetched: git remote set-branches myOrigin myBranch This adds the proper entries to .git/config: [remote "myOrigin"] fetch = +...
metacubed's user avatar
  • 7,351
2 votes
1 answer
2k views

With some help I managed to recover a local git project from a fatal: not a git repository (or any of the parent directories): .git issue... Why does git not recognise my local repository? But now my ...
Dan's user avatar
  • 239
2 votes
2 answers
3k views

When performing a git checkout on, for example, the Linux kernel tree to get a specific branch, I am using a pattern: git checkout rpi-4.19.y This branch corresponds to a kernel tree for Raspberry Pi ...
David Shepard's user avatar

15 30 50 per page