Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

its-fun/git-practice

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
4 Commits
 
 
 
 

Repository files navigation

Git/Github练习

注意:新建的所有分支都需要提交到Github仓库中,并且即使merge了,Github仓库中的这些 分支也不应该删除

  1. 从github上把该项目仓库复制到自己的Github帐号下

  2. 把自己帐号下的项目仓库克隆到本地

  3. 切换到该项目的practice分支,完成其中的README.md所描述的任务

  4. 新建一个main.c文件,实现输出hello, world!的功能,并提交到仓库中

  5. 编译并运行,此时使用git status查看状态,如果编译的中间文件或者目标文件在 Untracked files中,请修改.gitignore文件以忽略这些文件

  6. 删除此文件所在目录下的LICENSE文件并提交到仓库中

  7. 新建分支为python-hello并切换到此分支下

  8. 重命名main.c文件为main.py,并将其中的C语言代码改为Python代码,实现相同的功能, 然后提交

  9. 想办法找回LICENSE文件并提交。注意:这一步可能会新建分支,如果你新建了分支,请记得提交 到Github的仓库中

  10. 回到master分支,新建main.py文件并使用Python实现输出斐波那契数列中的第100个数 的功能,然后提交此文件

  11. 此时merge第7步新建的分支,并处理冲突(保留两个文件中的所有功能,即既打印 hello, world!,又打印第100个斐波那契数)

  12. 把所有分支都提交到Github仓库中

  13. njuopn/git-practice发起pull request,练习即完成

About

Git/Github练习

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.