type : string default : "true" - name : subdirectory description : Subdirectory inside the `output` Workspace to clone the repo into. Setting this to `false` is not advised unless you are sure that you trust your git remote. type : string default : "1" - name : sslVerify description : Set the `http.sslVerify` global git config. type : string default : "true" - name : depth description : Perform a shallow clone, fetching only the most recent N commits. (branch, tag, sha, ref, etc.) type : string default : "" - name : submodules description : Initialize and fetch git submodules. type : string - name : revision description : Revision to checkout. params : - name : url description : Repository URL to clone from. name : basic-auth optional : true description : | A Workspace containing a. ssh directory with private key, known_hosts, config, etc. name : ssh-directory optional : true description : | A. workspaces : - name : output description : The git repo will be cloned onto the volume backing this Workspace. See this great answer which explains the 'git reset' command and the difference between -hard vs -mixed.ApiVersion : v/v1beta1 kind : Task metadata : name : git-clone labels : /version : "0.4" annotations : v/pipelines.minVersion : "0.21.0" v/categories : Git v/tags : git v/displayName : "git clone" spec : description : >- These Tasks are Git tasks to work with repositories used by other tasks in your Pipeline. When you're done, perform a pull in Team Explorer → Sync to bring your local branch to the remote branch's latest commit. In Team Explorer → Sync and then in the View History window, you will end up with incoming commits from the desired commit to the latest commit in the remote branch, and your local code will match the desired commit. Right-click on the desired commit and select Reset → Reset and Delete Changes (-hard). Make sure you don't have any outgoing commits - perform a Push, if you do have outgoing commits (*Team Explorer → Sync → Outgoing Commits).Make sure to perform step 1 (push any outgoing commits) With this approach, any outgoing commits will be lost. To reset the entire solution/source repository to a specific commit: You could now reset mixed again on the latest commit to see only the one file that you are using the old version of in Team Explorer → Changes, but if all you're trying to do is run the solution, this step is unnecessary. You will now have the latest of every file in the repository except for the file that you just undid the changes on. This will revert that file to the commit that you reset on - undoing back to what is in that commit.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |