I have a Git repository I would like to check out onto a server. Is there a Chef recipe that does that?
This is accomplished by entering the command 'git branch' in the command line. After entering the command you will be presented with a list of all available branches in your repository. These are the branches that you can switch to using the checkout command.
Open “Git Bash” and change the current working directory to the location where you want the cloned directory. Type git clone in the terminal, paste the URL you copied earlier, and press “enter” to create your local clone.
In the left sidebar, under the list of repositories, use the "Manage notifications" drop-down menu and click Watched repositories. Evaluate the repositories that you are watching and decide if their updates are still relevant and helpful.
The git checkout command navigates between two different branches in a Git repository. Checkout is used to view and make changes to different branches. You can check out a past commit in a repository to view how your project appeared in that state.
The git SCM resource is probably what you're looking for. Simple resource usage example:
git "/path/to/check/out/to" do
repository "git://github.com/opscode/chef.git"
reference "master"
action :sync
end
Also see "revision" attribute if you want to grab a specific branch.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With