Comments (1)
Thanks for the issue report.
The basic problem is that git status
will straight up lie to you about the status of your origin/main
branch, if you don't first do a git fetch --all
to update what Git knows.
Also git status
will only show you the status compared to the origin/main
branch as that is the tracking branch for the local main
branch. You'll need to manually figure out where you are in relation to the upstream branches with other Git commands.
This will be added to the guide for sure, as I see new developers struggle with this all the time.
Git fetch to check for updates to fork and remotes
Use git fetch --all --prune
, to check for updates on your fork and remotes, --prune
will remove pointers to branches on the origin
or upstream
that are no longer present.
Check local branches
Use git branch -vv
to check all your local branches.
You can remove local branches that are gone on the remote with git branch -D name_of_branch_to_remove
.
Getting a list of all remotes with:
$ git remote -vv
origin https://github.com/RoostingGeese/git-gosling.git (fetch)
origin https://github.com/RoostingGeese/git-gosling.git (push)
Configuring a remote for a fork
If you are using a fork, you should setup a new remote called upstream
that points to the upstream project.
$ git remote add upstream https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git
Checking where you are in relation to all other branches
I recommend you try out git log --all --decorate --oneline --graph
.
This will give you a big overview of all commits on all branches.
That way you can compare if you are ahead/behind of the upstream branch.
from git-gosling.
Related Issues (20)
- Ensure the site has a description in the META tag
- move "conventions used in guide" to "getting started" sidebar
- move list of abbreviations to getting started sidebar
- Expand on section covering conventional commits
- Improve dependency bot section
- explain why you need to configure your code editor with Git
- Add GitHub Logo to website navbar HOT 1
- Improve repo tagging HOT 1
- Improve about repo text HOT 1
- Improve README.md
- Add description metadata to front-matter Markdown files
- Dependency Dashboard
- Use Husky to run Prettier before committing
- Migrate to MkDocs + Material for MkDocs
- Use `.nvmrc` file
- Create practice repo, with a md-file for every medient.
- Flow lesplan bedenken, practice repo integreren.
- Add section covering `git bisect`
- Add the short help command option `-h`, to the getting help section
- Action Required: Fix Renovate Configuration
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from git-gosling.