In addition you can pass a tag instead of branch for the same effect. This is purely a convenience utility to save you time from downloading the HEAD ref of the repository and then having to additionally fetch the ref you need. Similar to git init --bare, when the -bare argument is passed to git clone, a copy of the remote repository will be made with an omitted working directory.
This means that a repository will be set up with the history of the project that can be pushed and pulled from, but cannot be edited directly. In addition, no remote branches for the repo will be configured with the -bare repository. Like git init --bare, this is used to create a hosted repository that developers will not edit directly.
Passing the --mirror argument implicitly passes the --bare argument as well. This means the behavior of --bare is inherited by --mirror. Resulting in a bare repo with no editable working files. In addition, --mirror will clone all the extended refs of the remote repository, and maintain remote branch tracking configuration.
You can then run git remote update on the mirror and it will overwrite all refs from the origin repo. Giving you exact 'mirrored' functionality. For a comprehensive list of other git clone options visit the official Git documentation. In this document, we'll touch on some other common options. A thorough refrence on Git templates can be found on our git init page. Git has its own URL syntax which is used to pass remote repository locations to Git commands.
Because git clone is most commonly used on remote repositories we will examine Git URL syntax here. Secure Shell SSH is a ubiquitous authenticated network protocol that is commonly configured by default on most servers.
Because SSH is an authenticated protocol, you'll need to establish credentials with the hosting server before connecting. A protocol unique to git. Git comes with a daemon that runs on port Hyper text transfer protocol.
In this document we took a deep look at git clone. The most important takeaways are: 1. There are many different configuration options available that change the content of the clone. For further, deeper reference on git clone functionality, consult the official Git documentation. We also cover practical examples of git clone in our setting up a repository guide.
Learn about code review in Bitbucket Cloud Create a repository Clone and make a change on a new branch If you're using command line If you're using Sourcetree Create a pull request to merge your change. Learn branching in Bitbucket Cloud Get set up Review branching workflow. Learn undoing changes with Bitbucket Cloud git status git log git reset git revert. It only takes a minute to sign up.
Connect and share knowledge within a single location that is structured and easy to search. I want to use GitHub on a server where user accounts are not supposed to be able to go online otherwise. The GitHub Windows app does not even install without users' downloading it themselves see my previous question , but also for my regular use, what is the bare minimum one needs to open up? By opening up I mean user account privileges under Windows Server specifically or firewall rules. See also the follow-up on StackOverflow about whether an open port is all I need.
An official GitHub help page might have the answer:. We currently serve our applications via the following IP address range. In order to access all of our services, please ensure that TCP ports 22, 80, , and are allowed via the IP range above. We highly recommend that you don't white list IPs for Service Hooks. Subscribe to the API Changes blog to stay current. We also own the following block of IP addresses which will be used in the future.
This page will be updated once they are in active use. Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Learn more. What firewall ports need to be open to allow access to external git repositories?
Ask Question. Asked 11 years, 1 month ago. Active 5 years ago. Viewed k times. What firewall port s need to be open to allow access to external git repositories? Improve this question. Add a comment. Active Oldest Votes. Improve this answer. Chopper3 Chopper3 99k 9 9 gold badges silver badges bronze badges.
It depends on the repository. CesarB CesarB 2, 14 14 silver badges 9 9 bronze badges. Thank you for the additional ports and justification for each. This is a more complete answer to the question.
0コメント