Guest User

Untitled

a guest
Mar 5th, 2018
489
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.33 KB | None | 0 0
  1. freenet$ mkdir fred
  2. freenet$ cd fred/
  3. freenet/fred$ git init
  4. Initialized empty Git repository in /home/sdiz/build/freenet/fred/.git/
  5.  
  6. freenet/fred$ <edit file=".git/config">
  7. [core]
  8. repositoryformatversion = 0
  9. filemode = true
  10. bare = false
  11. logallrefupdates = true
  12. [remote "official"]
  13. url = git://github.com/freenet/fred-official.git
  14. fetch = +refs/heads/*:refs/remotes/official/*
  15. [remote "staging"]
  16. url = git@github.com:freenet/fred-staging.git
  17. fetch = +refs/heads/*:refs/remotes/staging/*
  18. push = refs/heads/staging:refs/heads/master
  19. [user]
  20. name = Daniel Cheng (鄭郁邦) <freenet@freenetproject.org>
  21. email = freenet@freenetproject.org
  22. [branch "stable"]
  23. remote = official
  24. merge = refs/heads/master
  25. rebase = true
  26. [branch "staging"]
  27. remote = staging
  28. merge = refs/heads/master
  29. rebase = true
  30. </edit>
  31.  
  32.  
  33. freenet/fred$ git fetch official ; git fetch staging
  34.  
  35. [.......]
  36. freenet/fred$ git branch stable official/master
  37. freenet/fred$ git branch staging staging/master
  38.  
  39. freenet/fred$ git checkout -f staging
  40. warning: You appear to be on a branch yet to be born.
  41. warning: Forcing checkout of staging.
  42. Switched to branch "staging"
  43. freenet/fred$ ls
  44. AUTHORS build_binary.xml build.xml devnotes LICENSE.Freenet LICENSE.Mantissa README src test
  45.  
  46. freenet/fred$ # List the changes from stable to HEAD
  47. freenet/fred$ git log stable..
  48. commit b043b9ca080d7c454e34eb5fb9dc506c514d6798
  49. Author: Thomas Sachau <tommy@gentoo.org>
  50. Date: Sat Apr 25 14:36:27 2009 +0200
  51.  
  52. Test commit
  53.  
  54. freenet/fred$ # .... and with diffs
  55. freenet/fred$ git log -p stable..
  56. commit b043b9ca080d7c454e34eb5fb9dc506c514d6798
  57. Author: Thomas Sachau <tommy@gentoo.org>
  58. Date: Sat Apr 25 14:36:27 2009 +0200
  59.  
  60. Test commit
  61.  
  62. diff --git a/README b/README
  63. index ab7659e..981020e 100644
  64. --- a/README
  65. +++ b/README
  66. @@ -101,3 +101,4 @@ other code:
  67. - Mantissa is under the modified BSD license. See README.Mantissa. According
  68. to the FSF, modified BSD is compatible with GPL; we must include both
  69. licenses.
  70. +
  71. freenet/fred$ <edit something locally>
  72.  
  73. freenet/fred$ git commit -av
  74.  
  75.  
  76. freenet/fred$ git push staging
  77. Counting objects: 21, done.
  78. Compressing objects: 100% (13/13), done.
  79. Writing objects: 100% (13/13), 1.60 KiB, done.
  80. Total 13 (delta 9), reused 0 (delta 0)
  81. To git@github.com:freenet/fred-staging.git
  82. b043b9c..63c006d master -> master
  83.  
  84. freenet/fred$
Add Comment
Please, Sign In to add comment