NiklasRosenstein / git-worklog

Migrated to https://gitlab.niklasrosenstein.com/NiklasRosenstein/python/nr.cli.git-worklog
MIT License
1 stars 1 forks source link

Option to automatically push on checkout #2

Open NiklasRosenstein opened 6 years ago

NiklasRosenstein commented 6 years ago

This could be enabled in the global ~/.gitconfig, eg.:

[timetracking]
  push-on-checkout = true

or additionally as a command-line flag --push to the git timetracking checkout command.

There is also the potentional of existing changes on the remote and conflicts. I think that simply doing git pull or even git pull --rebase would suffice. Also, I imagine we can think about potential conflicts another time (if you consistently push your work logs and no-one else modifies your own work logs, it should be fine).

NiklasRosenstein commented 6 years ago

I just noticed, we can't just push to origin all the time, so we would need a way to configure the remote for the timetracking branch. Maybe it's just simpler to manually push the timetracking branch.