У меня есть основная ветвь и ветвь searchfeature в моем проекте. Я перенес ветку searchfeature в удаленный репозиторий, пока все нормально
Когда я работал над этой веткой этим утром, я сделал "git push", я получил следующее:
warning: You did not specify any refspecs to push, and the current remote
warning: has not configured any push refspecs. The default action in this
warning: case is to push all matching refspecs, that is, all branches
warning: that exist both locally and remotely will be updated. This may
warning: not necessarily be what you want to happen.
warning:
warning: You can specify what action you want to take in this case, and
warning: avoid seeing this message again, by configuring 'push.default' to:
warning: 'nothing' : Do not push anything
warning: 'matching' : Push all matching branches (default)
warning: 'tracking' : Push the current branch to whatever it is tracking
warning: 'current' : Push the current branch
Так что я пошел вперед и сделал git config push.default tracking и вуаля, git push работает без проблем, без предупреждения.
Что я не понимаю, так это то, в чем разница между «текущим» и «отслеживанием», если вы не делаете «к тому, что он отслеживает», то в чем смысл «текущего» - куда бы он пошел? какие сценарии вы бы использовали текущий, а не отслеживание?
Кроме того, по каким сценариям можно использовать "ничто"?