Git noob here. Here's my conundrum:
Is there a way to "lightly" push changes, just to show what I've been working on, but won't update others' local files if they pull the Branch?
I usually push code like this:
git add .
git commit -m "this code doesn't work yet, and shouldn't be pulled"
git pull origin myBranch
git status
git pull origin myBranch
What should I use to accomplish this? A new Branch? A Fork? I'm not too sure about the terminology, if I knew I could easily goog it.
No. Just push to a different branch. This is an issue of branch policies, which your team needs to define.
If you push your changes on the remote repo, your teammates will see theses changes, so a good practice is to create a feature
branch (see the git-flow recommendation) which will be merged into the current branch latter.
In this feature branch you can push useless commits, it doesn't matter if you push bad commits messages BUT once you are ready to merge the feature branch into the branch used by your mates you can run this command before git rebase -i, in order to rewrite the history to keep only useful commits messages.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With