📣 黑五价提前开抢|VIP一年通行证5折,蓝莓、Offer多多同步特惠
查看: 8379| 回复: 30
跳转到指定楼层
上一主题 下一主题
收起左侧

[其他] github新人求指导

全局:

注册一亩三分地论坛,查看更多干货!

您需要 登录 才可以下载或查看附件。没有帐号?注册账号

x
今天下午弄了半天,就是看不懂
github自己的帮助文件也不是写给完全新人看的,生词太多,解释也还是生词。。。
现在情况是已经下载各种东西成功,账号创建好了
跟着github bootcamp帮助文件在github.com创建了一个new repo
但是如何从local跟这个repo连接上呢?
假定我local folder里面已经写了10个文件,如何把这个10个文件弄到网上的这个repo去呢?
帮助里面只有git remove add origin -- 我敲这一行--没有任何output
git add * 出来一堆warning:
sth will be replaced by sth else
The file will have its original line endings in your working directory.

blablabla, 一大堆。。。。

what should I do next??

上一篇:CareerCup 10.1
下一篇:CareerCup 10.2
🔗
 楼主| modifiedname 2012-8-7 07:58:55 | 只看该作者
全局:
这里有个cheat sheet
http://rogerdudler.github.com/git-guide/files/git_cheat_sheet.pdf

依然看不懂
比如什么叫clone?什么情况下用到clone?
clone from where to where?
回复

使用道具 举报

🔗
weixc1234 2012-8-7 09:00:39 | 只看该作者

回帖奖励 +1

全局:
clone 是将原有的库克隆到自己电脑上
回复

使用道具 举报

🔗
duanmupeiyi 2012-8-7 09:57:24 | 只看该作者

回帖奖励 +1

全局:
Here are the instructions I made for my teammates last semester (with modification):

Setup:
  • Sign up for github: github.com
  • Follow their instruction of "Set up git"
  • If the directory "~/.ssh" does not exist, create one.
  • Generate ssh key (if you already have some keys, back them up. If you need the current pub key to ssh, you can use the "-i" option of ssh)
  • Add the key to your account ("Setting")
  • cd to a folder and then run: $ git clone git@github.com:someuser/FinalProj.git (for more about remotes, see http://progit.org/book/ch2-5.html)

Testing:
There should be one file “README” in the folder “FinalProj.” Modify the file README.
To commit changes:
$ git add changedfilename
$ git commit -m “some message”
$ git push

To pull latest version from central repo:
$ git pull

Git: Collaboration Workflow
(copied from Adam’s slides, see below for link)
  • Pull latest version from central repo
  • Modify code/document
  • Commit changes (early and oen!)
  • Pull (again, and resolve any merge conflicts)
  • Push your changes to the central repo
  • Repeat



More info:
This is great intro book: (read chp2)
http://progit.org/book/

To gain some basic ideas about Git:
See 02.25.2011 "Introduction to git, a version control system" by Adam Morgan
https://www.stat.berkeley.edu/mediawiki/index.php/Productivity_Seminar
Note: some info and link are outdated. But the ideas and suggested workflow still work.

To change default editor to emacs:
git config --global core.editor emacs

点评

赞!差不多也就是这些了~  发表于 2012-8-7 11:33

评分

参与人数 3大米 +153 收起 理由
D-Bazinga + 3 感谢分享!
modifiedname + 100 感谢感谢~
RehsuR + 50

查看全部评分

回复

使用道具 举报

🔗
RehsuR 2012-8-7 11:39:46 | 只看该作者

回帖奖励 +1

全局:
小K 发表于 2012-8-6 17:58
这里有个cheat sheet
http://rogerdudler.github.com/git-guide/files/git_cheat_sheet.pdf

clone 就是从 remote clone 到 local。

local repo 在 init 之后,先git add files, 然后commit,这个commit是commit到local repo,然后git push origin BRANCH (replace BRANCH with your current branch name),这样才把local repo push 到 github 上。
回复

使用道具 举报

🔗
zxzxy1988 2012-12-23 10:43:20 | 只看该作者

回帖奖励 +1

全局:
http://boxysystems.com/index.php ... es-between-git-svn/
5 Fundamental differences between GIT & SVN
我倒觉得这篇文章讲了一些基本的区别....对于从svn过来的,对git总是不理解,哈哈哈
回复

使用道具 举报

🔗
kinslover 2012-12-25 05:49:25 | 只看该作者

回帖奖励 +1

全局:
north212 发表于 2012-12-23 16:51
一直不懂github是干嘛的,是不是提供一个空间让大家上传自己的git?

算是代码版本管理平台,你可以随时创建一个新的brunch,也可以对其合并等等,也可以回复到以前的某个版本
回复

使用道具 举报

🔗
ScytheV 2012-12-30 14:30:29 | 只看该作者

回帖奖励 +1

全局:
GitHub既可以用git来玩,也可以当做SVN来用。

如果你用Mac,
- git download法:打开terminal,进入想存放的目录,git clone XXXX, XXXX为repo地址,可从GitHub里查到。
- SVN: 没在Mac下用过SVN

如果你用Windows,
- git: 下载一个Tortoise git,然后安装,打开explorer,进入想存放的目录,右击空白处,找到Tortoise git,然后点clone,然后输入信息
- SVN: 下载Tortoise SVN,步骤类似

希望对你有帮助。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号
隐私提醒:
  • ☑ 禁止发布广告,拉群,贴个人联系方式:找人请去🔗同学同事飞友,拉群请去🔗拉群结伴,广告请去🔗跳蚤市场,和 🔗租房广告|找室友
  • ☑ 论坛内容在发帖 30 分钟内可以编辑,过后则不能删帖。为防止被骚扰甚至人肉,不要公开留微信等联系方式,如有需求请以论坛私信方式发送。
  • ☑ 干货版块可免费使用 🔗超级匿名:面经(美国面经、中国面经、数科面经、PM面经),抖包袱(美国、中国)和录取汇报、定位选校版
  • ☑ 查阅全站 🔗各种匿名方法

本版积分规则

>
快速回复 返回顶部 返回列表