First, when you create a branch, do so with git switch: git switch -c test origin/master, preferably after a git fetch (in order for origin/master to reflect the latest commit pushed there)

Then make sure your first push is git push -u origin test in order to establish a remote tracking branch origin/test, which will facilitate the subsequent pushes to that branch.

When you colleague do a git switch test (after a fetch), the default guess mode automatically establish a remote tracking branch (as if they typed git switch -c <branch> --track <remote>/<branch>)
That is why a simple git pull would be enough to update their local test branch after your step 5.

Answer from VonC on Stack Overflow
🌐
CloudBees
cloudbees.com › blog › git-pull-how-it-works-with-detailed-examples
Git Pull: How It Works With Detailed Examples
July 9, 2021 - Learn how to use git pull, with detailed examples on what it does and step-by-step guidance on syncing with remote repositories.
🌐
W3Schools
w3schools.com › git › git_pull_from_remote.asp
Git Pull from Remote
It lets you see what others have pushed before you merge or pull. git fetch origin remote: Enumerating objects: 5, done. remote: Counting objects: 100% (5/5), done. remote: Compressing objects: 100% (3/3), done. remote: Total 3 (delta 2), reused ...
Discussions

github - Git pull command - Stack Overflow
Please help to clarify the question below. I have done the following steps. git checkout -b test origin/master Made some code changes git add followed by git commit and git push One of my colleagues More on stackoverflow.com
🌐 stackoverflow.com
request-pull - how it works?
Not trying to be rude, just trying to gauge your level of understanding. Do you realize that there is a difference between a github pull request, and the output of git's request-pull command? While they have a similar intent, they are in no way related. More on reddit.com
🌐 r/git
19
5
October 23, 2020
version control - How do I git pull a dev branch? - Drupal Answers
I'm trying to switch to the dev version of Views. Repository instructions worked and I was able to git clone Views. However, listing the available branches with git branch -a only shows * 7.x-3.x ... More on drupal.stackexchange.com
🌐 drupal.stackexchange.com
April 30, 2012
is git pull not recommended?
If you're working with branches that get updated by multiple contributors regularly, using pull on that branch can leave you in conflicted states that can be annoying. Using the --rebase switch like another comment mentioned can help keep the history linear but it doesn't necessarily solve the conflict issues. Not using pull doesn't make the problem go away, it just keeps you from ending up in a conflicted state you have to resolve before continuing, letting you instead choose how and when you want to deal with potential conflicts (typically alternative flow is doing fetch, then doing a merge or rebase when you're ready). If you don't find yourself consistently working on branches that others are contributing to, then pull likely won't cause you any issues. More on reddit.com
🌐 r/git
18
4
May 14, 2022
🌐
Atlassian
atlassian.com › git › tutorials › syncing › git pull
How to Pull a Git Repository? | Atlassian Git Tutorial
Executing the default invocation of git pull will is equivalent to git fetch origin HEAD and git merge HEAD where HEAD is ref pointing to the current branch. ... This example first performs a checkout and switches to the <new_feature> branch.
🌐
Git
git-scm.com › docs › git-pull
Git - git-pull Documentation
Defaults to the configured upstream for the current branch, or origin. See UPSTREAM BRANCHES below for more on how to configure upstreams. ... Which branch or other reference(s) to fetch and integrate into the current branch, for example main in git pull origin main.
🌐
Linux Kernel
kernel.org › pub › software › scm › git › docs › git-pull.html
git-pull(1)
Defaults to the configured upstream for the current branch, or origin. See UPSTREAM BRANCHES below for more on how to configure upstreams. ... Which branch or other reference(s) to fetch and integrate into the current branch, for example main in git pull origin main.
Find elsewhere
🌐
GitHub
github.com › git-guides › git-pull
Git Guides - git pull · GitHub
If this happens, use git status to identify what changes are causing the problem. Either delete or commit those changes, then git pull or git merge again. Keeping the main branch up to date is generally a good idea. For example, let's say you have cloned a repository.
🌐
DevDojo
devdojo.com › guide › git › git-pull
Git Pull - Learn Git
You already know that you can use the git push command to push your latest commits, so in order to do the opposite and pull the latest commits from GitHub to your local project, you need to use the git pull command.
🌐
Vercel
vercel.com › vercel documentation › ship and scale › git
Deploying Git Repositories with Vercel
June 16, 2026 - When working with Git, have a branch that works as your production branch, often called main. After you create a pull request (PR) to that branch, Vercel creates a unique deployment you can use to preview any changes.
🌐
Reddit
reddit.com › r/git › request-pull - how it works?
r/git on Reddit: request-pull - how it works?
October 23, 2020 -

I want to do pull requests using `git request-pull`. I checked the documentation https://www.git-scm.com/docs/git-request-pull and tried to follow the example it described. The problem is - things do not seem to work. First thing which is problematic - the page talks about releases. I cannot find any resources about "releases".

This is what I did so far:

git commit -m "first commit"
git push -u origin main
git branch dupa
git checkout dupa
git add .
git commit -m "added a file"
git push -u origin dupa

Now I can see both branches and a new file in the dupa branch. Next thing I tried:

git request-pull dupa https://github.com/jakubiszon/test-repo main

The output was:

The following changes since commit bf4aa4fd1b4a217542cd28955b20b86ddfb26cb6:

  first commit (2020-10-22 18:18:57 +0200)

are available in the Git repository at:

  https://github.com/jakubiszon/test-repo main

for you to fetch changes up to bf4aa4fd1b4a217542cd28955b20b86ddfb26cb6:

  first commit (2020-10-22 18:18:57 +0200)

I am not sure what I did wrong. Both branches contain all relevant commits. Or don't they?

🌐
TheServerSide
theserverside.com › blog › Coffee-Talk-Java-News-Stories-and-Opinions › Git-pull-vs-fetch-Whats-the-difference
Git pull vs fetch: What's the difference?
If you try to do a git pull operation, but your working directory has uncommitted files, or a copy of the remote files into your workspace would create a merge conflict, the git pull operation short-circuits and turns into a git fetch operation instead.
🌐
Nobledesktop
blog.nobledesktop.com › learn › git › pull from a remote repository: git pull & git fetch
Pull From a Remote Repository: git pull & git fetch
April 19, 2026 - Walk through using git pull and git fetch to sync with remote repositories—command syntax, when to pull, and how to review changes before merging.
🌐
Git
git-scm.com › cheat-sheet
Git Cheat Sheet
git pull --rebase · git pull origin main OR git pull · git config user.name 'Your Name' git config --global ... git config alias.st status · man git-config · .git/config · ~/.gitconfig ·
Top answer
1 of 4
5

If I do

git clone --recursive --branch 7.x-3.x http://git.drupal.org/project/views.git

and then

git branch -r

I get

origin/4.6.x-1.x  
origin/4.7.x-1.x  
origin/5.x-1.x  
origin/6.x-2.11-security  
origin/6.x-2.x  
origin/6.x-3.x  
origin/7.x-3.x  
origin/8.x-3.x  
origin/HEAD -> origin/7.x-3.x  
origin/d7v3ui  
origin/master  

I believe you need the recursive flag to get all remotes. Not sure if you did that, but a quick git fetch will update your list of remotes.

git pull origin 7.x-3.x-dev
fatal: Couldn't find remote ref 7.x-3.x-dev
Unexpected end of command stream 

I think this is just due to the naming conventions, current dev is HEAD afaik.

git pull origin 7.x-3.x
From http://git.drupal.org/project/views
 * branch            7.x-3.x    -> FETCH_HEAD
Already up-to-date.

I believe that any branch (not tag) can be considered 'dev' for that drupal version.

Hope this helps.

2 of 4
6

I'm not a Git expert, but as I understand it all of the releases of the dev branch listed on the project page are made directly to the 7.x-3.x branch. Of course you're free to create your own branches locally for your own needs, but the master-like branch, which includes all of the releases pushed to drupal.org, is always going to be that 7.x-3.x branch.

If you want to switch to one of the tagged releases, use git tag to get a list of all the releases. Then, to check out the 7.x-3.1 release (for example), use git co 7.x-3.1.

If you intend to edit the code for this release, you can then create a new branch (as Git explains) by using git checkout -b mycustombranch.

🌐
ChatGPT Learn
developers.openai.com › codex › integrations › github
Codex code review in GitHub | ChatGPT Learn
Use Codex code review to get another high-signal review pass on GitHub pull requests.
🌐
freeCodeCamp
freecodecamp.org › news › git-pull-remote-branch-how-to-fetch-remote-branches-in-git
Git Pull Remote Branch – How To Fetch Remote Branches in Git
November 7, 2024 - If you want to fetch remote branches and merge them with your work or modify your current work, you can use the git pull command.
🌐
Davidvarghese
notes.davidvarghese.net › software-engineering › devops › git › commands › git-pull-command
Git Pull Command
January 28, 2024 - # Download remote changes git fetch <remote-name> git fetch <remote-name> <remote-branch>:<local-branch> # Add fetched changes into the local repo git merge git pull origin master # Pulls code from repo and append local changes on top of remote ...
🌐
LibreChat
librechat.ai › docs › docker
Docker | LibreChat
git clone https://github.com/danny-avila/LibreChat.git cd LibreChat · cp .env.example .env · The default .env file works out of the box for a basic setup. For in-depth configuration, see the .env reference. Windows · On Windows, use copy .env.example .env if cp is not available. docker compose up -d · The first launch pulls Docker images and may take a few minutes.
🌐
Medium
medium.com › @pinglinh › how-to-use-git-pull-80ad77a8afc6
How to use git pull. How to use git pull function? Let me… | by linhothy | Medium
July 27, 2016 - How to use git pull How to use git pull function? Let me tell you how I would usually push my first initial commit onto GitHub IF I already had some files on my local directory i.e. laptop. 1. I’d …