GitHub Workflow: Remotes, Pull Requests, Issues, and README
Learn how to use GitHub in a real development workflow, including remote repositories, pull requests, issues, and README files, with practical examples for .NET projects.
GitHub Workflow: Remotes, Pull Requests, Issues, and README
Git helps you track changes in your code, while GitHub provides a platform to store repositories online and collaborate with other developers. Understanding how GitHub fits into your daily workflow is essential when working on individual projects, contributing to open-source software, or collaborating with a development team.
In this guide, you'll learn how to connect a local Git repository to GitHub, share changes, create pull requests, track tasks with issues, and document a project using a README file.
1. What Is GitHub?
GitHub is a cloud-based platform for hosting Git repositories. It allows developers to collaborate, review code, track bugs, and manage development work.
For example, when building an ASP.NET Core Web API, you can use Git locally to track your code changes and GitHub to share the repository with teammates.
Git vs. GitHub:
- Git: A version control system that tracks changes in your code.
- GitHub: An online platform for hosting Git repositories and collaborating with others.
2. What Is a Remote Repository?
A remote is a reference to a Git repository hosted somewhere other than your local machine, such as on GitHub. It allows you to exchange changes between your local repository and the hosted repository.
Connect a Local Repository to GitHub
First, create an empty repository on GitHub. Then, connect your existing local repository to it:
git remote add origin https://github.com/username/MyDotNetApp.git
Here, origin is the conventional name for the remote repository. You can choose another name, but origin is commonly used for the primary remote.
To view configured remotes:
git remote -v
Push Your Code to GitHub
To upload your local commits to GitHub:
git push -u origin main
The -u option sets the upstream branch, making future pushes simpler.
Pull Changes from GitHub
To fetch changes from the remote repository and integrate them into your current branch:
git pull
Git uses the configured upstream branch when one is set. You can also specify the remote and branch explicitly:
git pull origin main
Remember: git push sends your local commits to a remote repository, while git pull fetches remote changes and integrates them into your current branch.
3. What Is a Pull Request?
A pull request (PR) is a GitHub feature that lets developers propose changes from one branch to another and review those changes before merging them.
For example, suppose you're adding authentication to an ASP.NET Core API. Instead of committing directly to main, you can create a feature branch, implement authentication, push the branch, and open a pull request.
Typical Pull Request Workflow
- Create a feature branch.
- Make your code changes.
- Commit your changes.
- Push the branch to GitHub.
- Open a pull request targeting the appropriate base branch.
- Review the code and address feedback.
- Run required checks and resolve any issues.
- Merge the pull request when it is approved and ready.
Example commands:
git switch -c feature/jwt-authentication
git add .
git commit -m "Add JWT authentication"
git push -u origin feature/jwt-authentication
After pushing, open your repository on GitHub and create a pull request from feature/jwt-authentication into main, or into the team's designated integration branch.
Why Are Pull Requests Important?
Pull requests support:
- Code reviews: Teammates can inspect your changes and suggest improvements.
- Quality checks: Automated tests and other checks can run before merging.
- Collaboration: Developers can discuss implementation decisions in one place.
- Safer integration: Changes can be reviewed before entering the target branch.
A pull request is a proposal for merging changes; creating one does not automatically merge the code.
4. What Are GitHub Issues?
GitHub Issues help teams track bugs, feature requests, improvements, and other development tasks.
For example, in a .NET project, you might create issues such as:
- Fix invalid login responses in the authentication API.
- Add pagination to the products endpoint.
- Improve database query performance.
- Write unit tests for the user service.
A useful issue should clearly describe the problem or task, the expected result, and any relevant steps to reproduce the issue.
Issues and Pull Requests Together
Issues and pull requests can be connected so a team can trace a task from discussion to implementation.
For example, you might create an issue titled "Add JWT authentication to the API", implement the feature on a separate branch, and reference the issue in your pull request description.
When appropriate, using a closing keyword such as Closes #12 in the pull request description can automatically close issue #12 when the pull request is merged into the repository's default branch.
This keeps development work organized and makes it easier to understand why a change was introduced.
5. What Is a README File?
A README.md file is the main documentation file commonly displayed on a repository's GitHub page. It helps developers understand what a project does and how to run it.
For an ASP.NET Core project, a good README should explain the purpose of the application, required tools, configuration, and setup steps.
What Should a README Include?
A useful project README typically contains:
- Project overview: What the application does.
- Features: The main functionality.
- Technologies: For example, ASP.NET Core, Entity Framework Core, and SQL Server.
- Prerequisites: Required SDKs, databases, and tools.
- Installation steps: How to clone and run the project.
- Configuration: Required environment variables or settings.
- API documentation: Swagger instructions or links, where applicable.
- Testing: How to run the test suite.
- Contribution guidelines: How developers can propose changes, when relevant.
Example README for an ASP.NET Core API
# MyDotNetApp
A sample ASP.NET Core Web API for managing products.
## Technologies
- ASP.NET Core
- Entity Framework Core
- SQL Server
## Prerequisites
- .NET SDK
- SQL Server
## Getting Started
1. Clone the repository.
2. Configure the database connection.
3. Apply database migrations if required.
4. Run the application.
## Run the Application
dotnet restore
dotnet run
## Testing
dotnet test
Keep the README aligned with the actual project. If setup instructions or configuration requirements change, update the documentation as part of the same development task.
Important: Never commit passwords, API secrets, or production connection strings to a public repository. Document required configuration using safe placeholders instead.
6. A Practical GitHub Workflow for .NET Developers
Imagine you're working with a team on an ASP.NET Core Web API. Your team uses GitHub to manage source code, review changes, and track work.
A typical workflow looks like this:
- Clone the repository or update your local copy.
- Create a branch for the issue or feature.
- Implement the changes locally.
- Build and test the application.
- Commit the changes with a meaningful message.
- Push the branch to GitHub.
- Open a pull request and link the related issue.
- Address review feedback and ensure required checks pass.
- Merge the pull request according to the team's workflow.
- Update your local
mainbranch before starting the next task.
Example commands:
git switch main
git pull origin main
git switch -c feature/product-pagination
# Make your code changes, then build and test
dotnet build
dotnet test
git add .
git commit -m "Add product pagination"
git push -u origin feature/product-pagination
Next, open a pull request on GitHub and request a review.
The commands above assume that main is the team's integration branch and that the repository is already configured. Always follow your team's branching, testing, and merge policies.
7. Common GitHub Mistakes to Avoid
- Pushing directly to
main: Follow the team's branch protection and pull request policies. - Committing secrets: Keep credentials out of source control and rotate any secret that is accidentally exposed.
- Writing unclear commit messages: Describe what changed, such as
Add product pagination. - Creating oversized pull requests: Keep changes focused so reviewers can understand them.
- Ignoring review feedback: Address comments and explain decisions when needed.
- Leaving the README outdated: Update setup instructions when project requirements change.
- Pulling without understanding local changes: Check your working tree and resolve conflicts carefully before integrating remote changes.
Frequently Asked Questions
1. What is the difference between Git and GitHub?
Git is a version control system that tracks code changes. GitHub is an online platform that hosts Git repositories and provides collaboration features such as pull requests, issues, and code reviews.
2. What is the difference between git push and git pull?
git push uploads local commits to a remote repository. git pull fetches remote changes and integrates them into the current branch.
3. Why do developers use pull requests?
Pull requests allow developers to propose changes, receive feedback, review code, and run automated checks before merging changes into a target branch.
4. What is the purpose of GitHub Issues?
GitHub Issues help teams organize and track bugs, feature requests, improvements, and other development tasks.
5. Why is a README file important?
A README explains a project's purpose, technologies, setup instructions, and usage. It helps other developers understand and run the project.
6. Should I create a separate branch for every feature?
For most collaborative projects, creating a separate branch for each feature or task keeps changes isolated and makes code reviews easier. Follow your team's branching strategy.
Conclusion
GitHub is more than a place to store code. Its remote repositories, pull requests, issues, and README files help developers collaborate, review changes, track work, and maintain understandable projects.
For .NET developers, becoming comfortable with this workflow is an important step toward contributing confidently to professional development teams.
Last updated 10/26/2026
Your notes
Sign in to save personal notes on this topic — they'll sync across your devices.
Was this tutorial helpful?
Help us create more free learning resources. Learn more
