emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

git push precautions


From: Ivan Shmakov
Subject: git push precautions
Date: Wed, 28 Jan 2015 18:30:57 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

>>>>> Yuri Khan <address@hidden> writes:

[…]

 > A good thing to do before pushing is to actually see the commit
 > graph, in gitk or gitg or gitx or in a pinch “git log --graph
 > --decorate --oneline”, with both the current local and remote
 > branches displayed.

        If the intent is to push just a sequence of changes to a branch
        (that is: with no merges involved), something like
        $ git log origin/branch..branch should suffice.  Personally, I
        also add ‘-p’ there and re-visit the changes.  With this option,
        git-log(1) produces output similar (AIUI) to git-show(1), for
        which I had no use so far.

 > And always be explicit about what you are pushing — always “git push
 > origin master”, never “git push”.  (“git config push.default simple”
 > helps but is not everybody’s default.)

        My preference is rather ‘push.default nothing’, so that
        git-push(1) fails loudly should I fail to specify what to push.

        And using $ git push -n does no harm, sure.

-- 
FSF associate member #7257  np. En akvo de la klara fonto — Jacques Yvart



reply via email to

[Prev in Thread] Current Thread [Next in Thread]