You have a Git Hub repository that contains workflows. The workflows contain steps that execute predefined actions. Each action has one or more versions.You need to request the specific version of an action to execute.Which three attributes can you use to identify the version? Each correct answer presents a complete solution.Note: Each correct selection is worth one point.
Answer(s): B,C,E
We strongly recommend that you include the version of the action you are using by specifying a Git ref, SHA [B], or Docker tag[E]. If you don't specify a version, it could break your workflows or cause unexpected behavior when the action owner publishes an update.* Using the commit SHA of a released action version is the safest for stability and security.* If the action publishes major version tags, you should expect to receive critical fixes and security patches while still retaining compatibility. Note that this behavior is at the discretion of the action's author.* Using the default branch of an action may be convenient, but if someone releases a new major version with a breaking change, your workflow could break.Example: Using a public action{owner}/{repo}@{ref}You can specify a branch[C], ref, or SHA[B] in a public GitHub repository.jobs:my_first_job:steps:- name: My first step# Uses the default branch of a public repository uses: actions/heroku@main- name: My second step# Uses a specific version tag of a public repository uses: actions/aws@v2.0.1
https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions
HOTSPOT (Drag and Drop is not supported)Your company uses a Git source-code repository.You plan to implement GitFlow as a workflow strategy.You need to identify which branch types are used for production code and preproduction code in the strategy.Which branch type should you identify for each code type? To answer, select the appropriate options in the answer area.Note: Each correct selection is worth one point.Hot Area:
Answer(s): A
Box 1: MainProduction codeThe purpose of the main branch in the Git flow workflow is to contain production-ready code that can be released.Box 2: DevelopPreproduction codeGit Flow: Develop BranchThe develop branch is created at the start of a project and is maintained throughout the development process, and contains pre-production code with newly developed features that are in the process of being tested.Newly-created features should be based off the develop branch, and then merged back in when ready for testing.
https://www.gitkraken.com/learn/git/git-flow
DRAG DROP (Drag and Drop is not supported)You have an Azure Repos repository that contains large PSD files.You need to configure Git LFS to manage all the files.How should you complete the script? To answer, drag the appropriate values to the correct targets. Each value may be used once, more that once, or not at all. You may need to drag the split bar between panes or scroll to view content.Note: Each correct selection is worth one point.Select and Place:
Box 1: git lfs track "*.psd"Defining which files should be tracked in Git LFSOnce Git LFS is installed you need to specify which files should be tracked in LFS. You can do this by specifying an entire folder to be tracked:git lfs track 'images'or you could specify that all files of a particular type should be tracked:git lfs track "*.psd"Box 2: git lfs migrate import--include="*.psd" --everything git-lfs-migrate(1)NAMEgit-lfs-migrate - Migrate history to or from Git LFSSYNOPSISgit lfs migrate <mode> [options] [--] [branch ...]DESCRIPTIONConvert files in a Git repository to or from Git LFS pointers, or summarize Git file sizes by file type. The import mode converts Git files (i.e., blobs) to Git LFS, while the export mode does the reverse, and the info mode provides an informational summary which may be useful in deciding which files to import or export.you can run git lfs migrate import to convert some file types to LFS:$ git lfs migrate import --include="*.mp3,*.psd"migrate: Fetching remote refs: ..., done migrate: Sorting commits: ..., done migrate: Rewriting commits: 100% (1/1), done main d2b959babd099fe70da1c1512e2475e8a24de163 -> 136e706bf1ae79643915c134e17a6c933fd53c61 migrate: Updating refs: ..., doneIf after conversion you find that some files in your working directory have been replaced with Git LFS pointers, this is normal, and the working copies of these files can be repopulated with their full expected contents by using git lfs checkout.Box 3: git pushPush the converted repository as a new repository:git push --forceWhile the --everything option means all commits reachable from any ref will be considered for migration, after migration only local refs will be updated even when --everything is specified. This ensures remote refs stay synchronized with their remote. In other words, refs/heads/foo will be updated with the --everything option, but refs/remotes/origin/foo will not, so it stays in sync with the remote until git push origin foo is performed. After checking that the results of a migration with --everything are satisfactory, it may be convenient to push all local branches to your remotes by using the --all option to git push.
https://github.com/Git-lfs/Git-lfs/wiki/Tutorial https://docs.gitlab.com/ee/topics/git/lfs/https://github.com/git-lfs/git-lfs/blob/main/docs/man/git-lfs-migrate.adoc
DRAG DROP (Drag and Drop is not supported)You have a GitHub repository that contains the code for an app named App1.App1 depends on a library of functions from a repository at https://github.com/contoso/afeed.You need to keep a clone of the afeed repository as a subdirectory of the App1 repository.How should you complete the Git command? To answer, drag the appropriate values to the correct targets. Each value may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.Note: Each correct selection is worth one point.Select and Place:
Box 1: clone git-clone - Clone a repository into a new directoryBox 2: branch--branch <name>Instead of pointing the newly created HEAD to the branch pointed to by the cloned repository's HEAD, point to <name> branch instead. In a non-bare repository, this is the branch that will be checked out. --branch can also take tags and detaches the HEAD at that commit in the resulting repository.Incorrect:* git pullThe git pull command is used to fetch and download content from a remote repository and immediately update the local repository to match that content.SYNOPSISgit pull [<options>] [<repository> [<refspec>...]]* git-add - Add file contents to the index* submoduleHow to use the sub-moduleIf I have two warehouses,module(Target Warehouse) andsubmodule(Sub-module warehouse).Add submodules existing warehouse git submodule add https://gitee.com/Hancoson/submodule.git module
https://git-scm.com/docs/git-clone https://git-scm.com/docs/git-pull
You have an app named App1 that you release by using Azure Pipelines. App1 has the versions shown in the following table.You complete a code change for version 3 to fix a bug that was introduced in version 3.4.3.Which version number should you assign to the release?
Answer(s): D
Semantic Versioning 2.0.0SummaryGiven a version number MAJOR.MINOR.PATCH, increment the:MAJOR version when you make incompatible API changesMINOR version when you add functionality in a backward compatible manner PATCH version when you make backward compatible bug fixesNote: Semantic Versioning Specification (SemVer)2. A normal version number MUST take the form X.Y.Z where X, Y, and Z are non-negative integers, and MUST NOT contain leading zeroes. X is the major version, Y is the minor version, and Z is the patch version.Each element MUST increase numerically. For instance: 1.9.0 -> 1.10.0 -> 1.11.0.6. Patch version Z (x.y.Z | x > 0) MUST be incremented if only backward compatible bug fixes are introduced.A bug fix is defined as an internal change that fixes incorrect behavior.
https://semver.org/
Post your Comments and Discuss Microsoft AZ-400 exam prep with other Community members:
Our website is free, but we have to fight against AI bots and content theft. We're sorry for the inconvenience caused by these security measures. You can access the rest of the AZ-400 content, but please register or login to continue.