github - Commits ahead on a Git cloned mirror repository -



github - Commits ahead on a Git cloned mirror repository -

i'm using git while now, making messes , weird stuff, accomplish workflow.

this scenario, got repos on github want force if got decent commit.

so i've cloned (--mirror) github repositories on workstation, can work on mirrors laptops , locally on workstation, without messing github ("commit often, force once" say).

everything pretty nice, fundamental thing need know before performing force mirror github know how many commits i'm ahead in mirror (i know, git status doesn't work 'cause mirror bare type repo).

simple schema of workflow:

(git cloned) -> (git mirror on workstation) -> (github)

so how can know how many commits i'm ahead in cloned mirror repo ?

wherever checkout mirror repository (at work or on laptop). add together sec remote github

git remote add together github git@github.com:username/repo.git

when finalize commits, can force them straight github without messing mirror @ all.

git force github master

then when want force wip commit, utilize force how , pushed mirror instead. see how far master ahead of github, can do

git log github/master..master

git github version-control mirror

Comments

Popular posts from this blog

c# - ASP.NET MVC Sequence contains no matching element -

java - Parsing XML, skip certain tags -

rest - How to invalidate user session on inactivity in a stateless server? -