Tag: branch

52 votes
5 answers
3.1K views
When does Git refresh the list of remote branches?

Using git branch --all shows all remote and local branches. When does Git refresh this list? On pull/push? An

avatar
Solomon
0 1 0 9
asked 07 September, 2021
53 votes
12 answers
1.5K views
Git pull a certain branch from GitHub

I have a project with multiple branches. I've been pushing them to GitHub, and now that someone else is w

avatar
Carmelina
0 1 0 9
asked 07 September, 2021
47 votes
30 answers
2.7K views
How can I delete all Git branches which have been merged?

I have many Git branches. How do I delete branches which have already been merged? Is there an easy way to del

avatar
Leonardo
0 1 0 9
asked 07 September, 2021
59 votes
30 answers
1.1K views
How to change the author and committer name and e-mail of multiple commits in Git?

I was writing a simple script in the school computer, and committing the changes to Git (in a repo that was in

avatar
Adolfo
0 1 0 9
asked 07 September, 2021
67 votes
30 answers
2.7K views
Git fetch remote branch

My colleague and I are working on the same repository. We've branched it into two branches, each technica

avatar
Brianne
0 1 0 9
asked 07 September, 2021
48 votes
30 answers
515 views
How to get the current branch name in Git?

I'm from a Subversion background and, when I had a branch, I knew what I was working on with "These worki

avatar
Santiago
0 1 0 9
asked 07 September, 2021
58 votes
24 answers
518 views
How do you create a remote Git branch?

I created a local branch which I want to 'push' upstream. There is a similar question here on Stack

avatar
Rudy
0 1 0 9
asked 07 September, 2021
59 votes
9 answers
546 views
Move existing, uncommitted work to a new branch in Git

I started some work on a new feature and after coding for a bit, I decided this feature should be on its own b

avatar
Chelsea
0 1 0 9
asked 07 September, 2021
57 votes
7 answers
2.4K views
How do I clone a specific Git branch?

Git clone will behave copying remote current working branch into local. Is there any way to clone a

avatar
Tuan
0 1 0 9
asked 07 September, 2021
58 votes
22 answers
3K views
Make an existing Git branch track a remote branch?

I know how to make a new branch that tracks remote branches, but how do I make an existing branch track a remo

avatar
Sena
0 1 0 9
asked 07 September, 2021
61 votes
30 answers
2K views
How to clone all remote branches in Git?

I have a master and a development branch, both pushed to GitHub. I've cloned, pulled, and fetched, but I

avatar
Percy
0 1 0 9
asked 07 September, 2021
58 votes
16 answers
374 views
How do I push a new local branch to a remote Git repository and track it too?

I want to be able to do the following: Create a local branch based on some other (remote or local) branch (via

avatar
Roger
0 1 0 9
asked 07 September, 2021
62 votes
15 answers
2.9K views
Move the most recent commit(s) to a new branch with Git

I'd like to move the last several commits I've committed to master to a new branch and take master b

avatar
Dwain
0 1 0 9
asked 07 September, 2021
59 votes
30 answers
2.1K views
How to remove local (untracked) files from the current Git working tree

How do you delete untracked local files from your current working tree?

avatar
Wilfredo
0 1 0 9
asked 07 September, 2021
57 votes
30 answers
1.1K views
How do I check out a remote Git branch?

Somebody pushed a branch called test with git push origin test to a shared repository. I can see the branch wi

avatar
Robt
0 1 0 9
asked 07 September, 2021
63 votes
30 answers
1.6K views
How do I rename a local Git branch?

I don't want to rename a remote branch, as described in Rename master branch for both local and remote Gi

avatar
Chelsea
0 1 0 9
asked 07 September, 2021
54 votes
30 answers
2K views
How do I delete a Git branch locally and remotely?

I want to delete a branch both locally and remotely. Failed Attempts to Delete a Remote Branch $ git branch -d

avatar
Corey
0 1 0 9
asked 07 September, 2021
63 votes
27 answers
2.9K views
Why is processing a sorted array faster than processing an unsorted array?

Here is a piece of C++ code that shows some very peculiar behavior. For some strange reason, sorting the data

avatar
Boyd
0 1 0 9
asked 07 September, 2021