New Pull Request Menu Item Greyed Out/Disabled in Visual Studio 2022 (17.9.0 Preview 2.1)

Abstract: Fixes the disabled New Pull Request menu in Visual Studio 2022 by resolving missing remotes, untracked branches, or authentication errors.

Created: 2026-10-04 by
The "New Pull Request" menu item in Visual Studio 2022 is disabled when the current branch lacks a remote tracking branch, no upstream repository is configured for Git, or the source control provider (GitHub, Azure DevOps) is not authenticated. This state prevents the IDE from determining where to push commits and create the corresponding pull request object on the remote server.

Verify Remote Repository Configuration

The most common cause for this issue is that the local Git repository does not know where its remote counterpart exists. Visual Studio requires a valid origin remote URL to function correctly with pull request workflows. If you cloned a repository locally but the remote was removed or changed, the integration breaks. To check your configuration, open the Solution Explorer, right-click the project or solution, and select Git > Remotes. Look for an entry named origin. If it is missing, you must add it by selecting Add Remote and pasting the HTTPS or SSH URL from your GitHub or Azure DevOps repository page. Once added, ensure the checkbox next to origin is selected as the active remote. Without this link, Visual Studio cannot establish the connection necessary to generate a pull request.

Establish Upstream Tracking Branches

Even if the remote URL is correct, the specific branch you are working on might not be linked to a branch on the remote server. Git distinguishes between local branches and remote-tracking branches. A pull request can only be created if the local branch has an associated upstream branch on the remote. You can verify this relationship by opening the Git Changes window. If your branch name appears without any remote reference, you need to set the upstream. Right-click the branch in the Branches list and choose Publish Branch. Alternatively, use the command line within Visual Studio’s terminal:
git push --set-upstream origin <branch-name>
This command pushes the current branch to the remote and sets the upstream tracking information. Once the upstream is established, the "New Pull Request" button becomes active because Visual Studio knows exactly which remote branch will receive the changes.

Check Authentication Status

Visual Studio 2022 relies on integrated authentication services to communicate with cloud-based version control systems. If your credentials have expired or the session has timed out, the UI elements related to remote operations will disable themselves to prevent failed network requests. Navigate to Tools > Options > Accounts. Ensure that your GitHub or Microsoft account is listed and shows a green checkmark indicating successful authentication. If you see an error or stale status, sign out and sign back in. For GitHub specifically, ensure you are using the personal access token method if password authentication is deprecated in your organization's policy. Re-authentication forces Visual Studio to refresh the API tokens required to create pull requests.

Validate Source Control Provider Selection

Sometimes the issue stems from the wrong provider being active. Visual Studio supports multiple providers, including GitHub, Azure Repos, and Bitbucket. If the project was initialized with one provider but you are trying to interact with another, the menu items may remain greyed out. Go to Tools > Options > Source Control > Plugin Selection. Verify that the correct plugin is selected for your repository type. If you recently migrated a repository or switched organizations, you may need to re-initialize the Git folder. Be aware that changing the provider often requires cleaning up the .git/config file to remove old remote references before adding new ones.

Related Resources

For more detailed guidance on integrating external tools with Visual Studio, see Running 'gh ...' Local Git Lot Changes. Additionally, if you encounter authentication loops during these processes, reviewing Troubleshooting OAuth2.0 Access Token Response may provide insights into token handling mechanisms.

Clear Visual Studio Cache

In rare cases, corrupted cache files within Visual Studio can cause UI states to persist incorrectly even after fixing configuration issues. The Git integration layer caches metadata about branches and remotes. If this cache becomes desynchronized with the actual Git state, the UI may fail to update the enabled state of buttons. To resolve this, close Visual Studio completely. Navigate to the user data directory, typically located at %LOCALAPPDATA%\Microsoft\VisualStudio\17.0\. Delete the ComponentModelCache folder. Restart Visual Studio and reopen your solution. The IDE will rebuild the cache from scratch, often restoring functionality to disabled menus.

Frequently Asked Questions

Why is the PR button greyed out if I have uncommitted changes?

Uncommitted changes do not disable the pull request menu; Visual Studio allows creating PRs from work-in-progress states. The button is disabled specifically due to missing remote configuration, lack of upstream tracking, or authentication failures. You can still commit your changes first, but the root cause remains environmental rather than state-based.

Can I create a pull request without publishing the branch first?

No, you must publish the branch to the remote repository before Visual Studio can create a pull request. Publishing creates the remote branch and sets the upstream tracking reference. Until the branch exists on the server, there is no target for the pull request, so the option remains inactive.

What if I am using Azure DevOps instead of GitHub?

The troubleshooting steps are identical regardless of the provider. Ensure you are signed into your Microsoft Account with appropriate permissions in Azure DevOps. Check the Source Control Plugin Selection to ensure Azure Repos is active. The logic for upstream tracking and remote URLs applies equally to both platforms.

Does deleting the .git folder fix this issue?

Deleting the .git folder destroys your local history and should be avoided unless you intend to start fresh. Instead, modify the .git/config file manually to remove incorrect remote URLs. This preserves your commit history while correcting the configuration that disables the UI features.

How do I know if my Git credentials are expired?

Try running a simple Git command like git fetch in the terminal. If it prompts for a password or returns a 401 Unauthorized error, your credentials are invalid. In Visual Studio, go to Tools > Options > Accounts to refresh your login session immediately.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More