我不完全理解使用Git或Github的目的;我知道它有助于跟踪您的更改,并且对与其他人协作的人很有帮助,但我没有与任何人协作,因此我不知道这是否对我有帮助。
我通常是一个网页设计师/开发人员,但我从来不需要合作。我知道在Git中为每个存储库创建、推送、提交、创建分支等等,但是.
发布于 2012-08-05 21:26:01
Git是一个版本控制系统;将它看作是代码的一系列snapshots (提交)。您可以看到这些快照的路径,它们按照创建的顺序排列。您可以创建分支来进行实验,然后返回到您拍摄的快照。
GitHub是一个网页,您可以在该网页上发布Git存储库,并与其他人协作。
不,只是本地的。您可以决定在GitHub上推动(发布)一些分支。
是的,如果不使用GitHub,则Git在本地运行。使用GitHub的另一种选择可能是在Dropbox上托管的文件上运行Git,但是GitHub是一种更精简的服务,因为它是专门为Git开发的。
这是另一回事,Git允许您跟踪更改和开发过程。如果您在GitHub中使用Git,它就会成为有效的备份。但是,通常情况下,您不会一直使用GitHub,这时如果出现问题,您就没有完整的备份。我在一个与Dropbox同步的文件夹中使用git。
是的,承诺和推动都是手动的。
- If you encounter an error between commits you can use the command `git diff` to see the differences between the current code and the last working commit, helping you to locate your error.
- You can also just go back to the last working commit.
- If you want to try a change, but are not sure that it will work. You create a branch to test you code change. If it works fine, you merge it to the main branch. If it does not you just throw the branch away and go back to the main branch.
- You did some debugging. Before you commit you always look at the changes from the last commit. You see your debug print statement that you forgot to delete.
确保检查gitimmersion.com。
发布于 2012-08-05 12:39:40
莱纳斯·托瓦尔兹会为此杀了你。Git是他编写的版本管理程序的名称。GitHub是一个由Git管理的源代码存储库的网站。因此,GitHub与原始Git工具完全无关。
如果提交更改,它将在本地存储。然后,如果您推送提交,它也会远程处理它们。
你可以,但我相信你不想手动设置一个git服务器为自己。GitHub的好处?好吧,使用起来很容易,很多人都知道它,所以其他人可能会找到你的代码,并跟随/分叉它来进行改进。
Git是针对源代码专门设计和优化的。
一点儿没错。
见4号。
发布于 2014-05-11 19:54:39
Git是一个分布式版本控制系统。它通常在本地机器的命令行中运行。它在“存储库”(或"repo")中跟踪您的文件和对这些文件的修改,但只在您告诉它这样做的时候。(换句话说,您可以决定要跟踪哪些文件,以及何时对任何修改进行“快照”。)
相反,GitHub是一个允许您在网上发布Git存储库的网站,这可能有很多原因(参见第3条)。
Git被称为"distributed" (rather than "centralized") version control system,因为您可以在本地运行它,并将其与Internet断开连接,然后随时将更改“推送”到远程系统(如GitHub)。因此,只有当GitHub手动告诉Git推动这些更改时,回购更改才会出现在上。
是的,没有GitHub,你可以使用Git。Git是一个“工作马”程序,它实际上跟踪您的更改,而GitHub只是托管您的存储库(并且提供了Git中不可用的附加功能)。以下是使用GitHub的一些好处:
- It provides a backup of your files.
- It gives you a visual interface for navigating your repos.
- It gives other people a way to navigate your repos.
- It makes repo collaboration easy (e.g., multiple people contributing to the same project).
- It provides a lightweight issue tracking system.
Git可以备份您的文件,尽管它为您提供了比传统备份系统更多的粒度控制,而不是备份的内容和时间。具体来说,每次您想要对更改进行快照时都会“提交”,而该提交包括对更改的描述和这些更改的逐行详细信息。这对于源代码来说是最优的,因为您可以很容易地在逐行级别上看到任何给定文件的更改历史。
是的,这是一个手工过程。
- Git employs a powerful [branching system](http://git-scm.com/book/en/Git-Branching) that allows you to work on multiple, independent lines of development simultaneously and then merge those branches together as needed.
- Git allows you to view the line-by-line differences between different versions of your files, which makes troubleshooting easier.
- Git forces you to describe each of your commits, which makes it significantly easier to track down a specific previous version of a given file (and potentially revert to that previous version).
- If you ever need help with your code, having it tracked by Git and hosted on GitHub makes it much easier for someone else to look at your code.
为了开始使用Git,我推荐在线图书Pro Git和GitRef作为方便的参考指南。开始使用GitHub时,我喜欢GitHub's Bootcamp和它们的GitHub Guides。最后,我创建了一个简短的videos series来向初学者介绍Git和GitHub。
https://stackoverflow.com/questions/11816424
复制相似问题