`

Git Wiki

阅读更多
Create Git repository on server

At home of user 'git'.


git@server:~$ mkdir myproject.git

git@server:~$ cd myproject.git

git@server:~/myproject.git$ git init --bare #Create repository on server.



Create a master branch for the server. At home of user 'git'.


git@server:~$ mkdir initial.commit

git@server:~$ cd initial.commit 

git@server:~/initial.commit$ git init 

git@server:~/initial.commit$ echo 'hello world' > index.html

git@server:~/initial.commit$ git add index.html

git@server:~/initial.commit$ git commit -m 'index.html'



Clone the repository on client.


myuser@local:~$ git clone git@server:~/myproject.git

myuser@local:~$ cd myproject

mysuer@local:~/myproject$ git remote add origin git@server:~/myproject.git

mysuer@local:~/myproject$ git push origin master

mysuer@local:~/myproject$ git pull origin master



Deploy your website using git.
git@server:~/myproject.git$ cd hooks

git@server:~/myproject.git/hooks$ vim post-receive

#!/bin/bash
GIT_WORK_TREE=/var/www/mywebsite 

git@server:~/myproject.git/hooks$ chmod +x post-receive

In the directory of your website, such as /var/www/mywebsite.
git@server:/var/www/mywebsite$ git init


Write code on your client machine, and push it to the master of server, deploy it to the website.
myuser@local:~/web$ git push origin master


Push default.
myuser@local:~/web$ git config --global push.default current


0
0
分享到:
评论

相关推荐

    all-about-git:WIP Git Wiki,专注于向开发人员介绍协作和开源项目

    All About Git repo 专为本次研讨会而创建,并将继续作为一个开源项目供合作者用作练习,同时也希望构建一个任何人都可以发布和访问的 Git wiki。 所以请贡献,贡献,贡献,但要有远见地构建一个维护良好且可靠的 ...

    git-wiki:git-wiki-主题的演示和文档

    git-wiki git-wiki-theme的演示和文档: :

    Ruby-Gollum一个简单基于Git的wiki

    Gollum - 一个简单,基于Git的wiki

    一个简单的,由Git支持的Wiki,带有一个精美的API和本地前端。-Ruby开发

    gollum-基于git的Wiki Gollum 5.0版发布了! 请参阅此处以获取与Gollum 4.x版相比所做的更改和新功能的列表,并查看Gollum功能的一些屏幕截图。 描述Gollum是一个简单的w gollum-基于git的Wiki Gollum 5.0版已经发布...

    wiki引擎git-wiki.zip

    git-wiki 是使用 Git 做为数据存储的 wiki 引擎,使用 Ruby 开发。要求环境支持: rubygems sinatra grit redcloth rubypants 标签:gitwiki

    github-wiki-sidebar:Github Wiki 侧边栏菜单构建器,具有多级、排序和排除列表支持

    特征: 从 Github Wiki 页面 (_Sidebar.md) 开始生成降价菜单使用用户输入(inquirer.js)逐步执行作业配置自动将更改推送到 git wiki 源存储库的选项菜单项排序选项选择要添加到排除列表的文件为生成的菜单定义模板...

    Git上的wiki构造工具Gollum.zip

    Gollum 是 Git 上面 wiki 系统的构造工具,简单实用。Gollum wikis 是简单的 Git 库,遵循特定的格式。Gollum 上面允许使用多种格式,有多种编辑的方式。 你可以在本地编辑你的 wiki : 用你最喜欢的编辑器或者...

    Wiki系统,基于Git、Markdown等标记语言,完美支持中文gitit.zip

    Gitit:一个基于 Markdown(及其他标记语言) Git 版本管理系统的 Wiki,使用 Haskell 语言编写。  官网:http://gitit.net  Github:http://github.com/jgm/gitit 中文...

    git svn转换工具

    svn+git实现离线提交并且不需要到处所有svn版本,速度超快非一般的感觉,超越git本身的git2svn...tortoisegit:https://code.google.com/p/tortoisegit/wiki/Download?tm=2(选择安装,如果不使用图像界面可以不安装)

    git-wiki:将git repo导出为基于markdown的html wiki

    git-wiki 将git repo导出为基于markdown的html wiki 安装 npm install -g git-wiki 要求 Linux 吉特 节点模块 标记的 提要阅读 异步的 用法 git-wiki cloneurl localdir cloneurl =您希望克隆的git repo local...

    Git教程-www.liaoxuefeng.com/wiki

    Git教程 廖雪峰 最好的教程, git入门,git操作手册,简单易懂

    newresume:努力实现更好的网络简历

    -或者- 只需复制并粘贴以下内容: mkdir newresume && cd newresume && git clone git@github.com:paulnorthup/newresume.git app && git clone git@github.com:paulnorthup/newresume.wiki.git wiki && cd app && ...

    git-sdk-64_2.zip.002

    git-sdk-64,源代码,编译git.exe需要,请参考:https://github.com/git-for-windows/git/wiki/Building-Git 共2卷,此为第2卷。

    git命令大全.docx

    Git (wiki: en chs )是一个免费开源的分布式版本控制系统,由linux内核作者linus Torvalds开发,大型开源项目linux kernel、Android、chromium、mono、dotnet、UE4等都使用Git管理项目

    git-sdk-64_2.zip.001

    git-sdk-64,源代码,编译git.exe需要,请参考:https://github.com/git-for-windows/git/wiki/Building-Git 共2卷,此为第1卷。

    melkor, 由 node.js 和Git提供的Wiki.zip

    melkor, 由 node.js 和Git提供的Wiki melkor 一个由 node.js 和Git提供的简单。查看实时演示( 每个小时重置一次)特性Git后端存储Markdown 编辑, Github口味响应式布局( 适合屏幕大小)ajax支持的编辑和导航( 具有...

    gollum:一个简单的,由Git支持的Wiki,带有一个精美的API和本地前端

    gollum-基于git的Wiki 请更新至Gollum 5.1.2,以应对最近的攻击。 分配CVE后,将提供更多信息。 Gollum 5.0版发布了! 请参阅,以获取与Gollum 4.x版相比所做的更改和新功能的列表,并查看Gollum功能的一些。描述...

    webperl:使用WebPerl在浏览器中运行Perl!

    您还可以将所有文档签出到该项目的子目录中,例如: $ git clone --branch gh-pages https://github.com/haukex/webperl.git pages$ git clone https://github.com/haukex/webperl.wiki.git wiki作者,版权和许可...

    Git教程--欢迎下载

    本教程只会让你成为Git用户,不会让你成为Git专家。很多Git命令只有那些专家才明白(事实上我也不明白,因为我不是...原文链接:http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000

    sublime-text-git, 一些git集成到 sublime text的插件.zip

    sublime-text-git, 一些git集成到 sublime text的插件 sublime-text 插件:gitGit集成:非常方便。 谁知道?有关支持什么以及如何安装的更多信息,请查看 wiki 。安装包控制安装这一简单的方法是使用包控制插件。...

Global site tag (gtag.js) - Google Analytics