私はdev VSTFS Gitリポジトリにいくつかのデータをバックアップしています。私がビルドを実行すると、ビルドディレクトリが消去され、Gitリポジトリと同期され、データが外部ソースからダウンロードされ、Gitにプッシュバックされます。VSTFSビルドでGitを早送りする必要があるのはなぜですか?
しかし、これが起こるたびに、私がプッシュする前にGitをプルしても、私は遅れており、早送りする必要があると言います。だから、私はGit pull-offをやる。
しかし、なぜこのようなことが起こるのか、さらに詳しく知りたいと思います。ディレクトリは毎回拭き取られるからですか?ここで
はビルドです: https://drive.google.com/file/d/0B8bQlVTjVjdoSWR6ZkhGOVNTd0U/view?usp=sharing
あなただけのデータを取得することを、PowerShellを無視することができます。
これは-ff
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'http://xxxxxx:8080/tfsdev/xxxxx/_git/Development.Services'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
私は、これはビルドでリポジトリ設定で、真=クリーンを選択することで解決することが分かってきた別の方法がなければ、バッチファイル
ECHO ADD GIT TO PATH
PATH %PATH%;C:\Program Files\Git\cmd
ECHO TEST PATH
set PATH
ECHO GIT STATUS
git status
ECHO GIT CHECKOUT MASTER
git checkout master
ECHO GIT PULL FASTFORWARD
git pull origin master -ff
ECHO GIT ADD ALL
git add -A
ECHO GIT COMMIT ALL
git commit -m "Backing up Octopus P01 and P02"
ECHO GIT PUSH
git push origin master
です。それはきれいに含まれており、ログに基づいて
Syncing repository: Development.Services (Git)
Running 'git clean -fdx' on D:\BuildAgents\_work\7\s.
Running 'git reset --hard HEAD' on D:\BuildAgents\_work\7\s.
HEAD is now at ****** Updated GitTest.bat
Starting fetch...
Checking out ****** to D:\BuildAgents\_work\7\s
Checked out branch refs/heads/master for repository Development.Services at commit ******
ビルド前またはビルド後にプルしますか?イベントの正確な順序は何ですか?基本的にこのガイドに従っていますか? https://www.visualstudio.com/en-us/docs/git/gitquickstart – Schwern
これを明確にするために、これはVisual StudioではなくWebポータルにあります。 – user1869558
プルはビルドで起こります。 – user1869558