gitworkflow

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
gitworkflow [2018/07/07 03:09] – Update FAQ about authornames SteveWillsgitworkflow [2021/12/14 20:46] (current) – Since this is the top Google result, Give users half a chance of finding the official git repo and 'git clone' URI. DavidOBrien
Line 1: Line 1:
 +The official %%FreeBSD%% Git repo is now at https://cgit.freebsd.org/src/
 +
 +Clone TL;DR:
 +(public-mirror)
 +https://git.FreeBSD.org/src.git
 +ssh:%%//%%anongit@git.%%FreeBSD%%.org/src.git
 +(developers-only)
 +ssh:%%//%%git@gitrepo.%%FreeBSD%%.org/src.git
 +
 +The content of this page needs to be updated, please refer to the latest doc from git migration WG at https://github.com/bsdimp/freebsd-git-docs/ , and the discussion on https://lists.freebsd.org/mailman/listinfo/freebsd-git .
 +
 +Update: 2020-12-14: These are not the repositories for the 2020/2021 svn to git conversion, please see the note above. The below is mostly historic information and will soon be entirely obsolete.
 +
 ====== Introduction ====== ====== Introduction ======
  
-This page describes the official git repositories of the %%FreeBSD%% project that can be used as common repositories to+This page used to describe the inofficial git mirrors of the SVN repositories of the %%FreeBSD%% project that could be used as common repositories to
 base other work on. base other work on.
  
-The repositories are read-only mirrors of the [[https://www.freebsd.org/doc/handbook/svn.html|src, doc and, ports FreeBSD Subversion repositories]] +The repositories were read-only mirrors of the [[https://www.freebsd.org/doc/handbook/svn.html|src, doc and, ports FreeBSD Subversion repositories]]
- +
-Using git to commit changes to these repositories is not officially supported (but doable). Instead it aims to serve as +
-a collaboration point by using additional tools like Github, Gitorious, or Gerrit, etc.+
  
 Bear in mind that git does not replace use of Subversion in %%FreeBSD%% and the Bear in mind that git does not replace use of Subversion in %%FreeBSD%% and the
Line 16: Line 26:
 As the actual tree objects for a certain SVN revision will remain identical, it will always be possible to rebase or merge your work on these new branches and not run into any merge conflicts. As the actual tree objects for a certain SVN revision will remain identical, it will always be possible to rebase or merge your work on these new branches and not run into any merge conflicts.
 Advance notice will be provided if this proves necessary, along with advice on the required git commands. Advance notice will be provided if this proves necessary, along with advice on the required git commands.
 +
 +In fact, "bad SVN metadata" escaped into the published repos on github.com, so they **will** be re-rolled at some future date.
  
 ====== Repositories ====== ====== Repositories ======
Line 21: Line 33:
 The repository mirrors are updated at least hourly. Should they lag the SVN repository by more than a day, please create a [[https://bugs.freebsd.org/bugzilla/enter_bug.cgi?component=Git%20Integration&product=Services|new Bugzilla Issue: Git Integration]]. Monitoring still needs to be put into place, help wanted btw. The repository mirrors are updated at least hourly. Should they lag the SVN repository by more than a day, please create a [[https://bugs.freebsd.org/bugzilla/enter_bug.cgi?component=Git%20Integration&product=Services|new Bugzilla Issue: Git Integration]]. Monitoring still needs to be put into place, help wanted btw.
  
-  * **[[https://github.com/freebsd/freebsd.git]]** +As of 2020-12-14, canonical repository of doc has been migrate to git: 
-  * **[[https://github.com/freebsd/freebsd-doc.git]]** + 
-  * **[[https://github.com/freebsd/freebsd-ports.git]]** (the preferred sources) +  * https://cgit.freebsd.org/doc/ (web repository browser) 
-  * git:%%//%%git-beta.freebsd.org/freebsd-base.git +  * ''%%https://git.FreeBSD.org/doc.git%%'' (readonly, geographically distributed mirror for cloning through https) 
-  * git:%%//%%git-beta.freebsd.org/freebsd-doc.git +  * anongit@git.%%FreeBSD%%.org:doc.git (readonly, geographically distributed mirror for cloning through anonymous ssh) 
-  * git:%%//%%git-beta.freebsd.org/freebsd-ports.git (the canonical sources)+  * git@gitrepo.%%FreeBSD%%.org:doc.git (read/write for committers to push) 
 + 
 +ports: 
 +  * **[[https://github.com/freebsd/freebsd-ports.git]]** (the preferred sources for cloning and browsing) 
 +  * https://cgit-beta.freebsd.org/ports/ (the canonical sources, web repository browser) 
 +  * ''%%https://cgit-beta.freebsd.org/ports.git%%'' (the canonical sources for cloning) 
 + 
 +src: 
 +  * **[[https://github.com/freebsd/freebsd.git]]** (the preferred sources for cloning and browsing) 
 +  * https://cgit-beta.freebsd.org/src/ (the canonical sources, web repository browser) 
 +  * ''%%https://cgit-beta.freebsd.org/src.git%%'' (the canonical sources for cloning)
  
 ====== Quick Start ====== ====== Quick Start ======
Line 48: Line 70:
  
 See any other git howto or documentation if you're stuck on the basics. See any other git howto or documentation if you're stuck on the basics.
-A useful reference for the issue with notes is http://git-scm.com/2010/08/25/notes.html.+A useful reference for the issue with notes is [[https://git-scm.com/book/en/v2|Pro Git book, written by Scott Chacon and Ben Straub and published by Apress]].
  
 ===== Adding SVN Revision Notes to an Existing Clone ===== ===== Adding SVN Revision Notes to an Existing Clone =====
Line 89: Line 111:
  
   * SVN merges for single revisions (that span only parts of the tree then), are not really representable as merges in git and instead are called cherry-picks there. The converter tries to be smart about whole tree merges however -- this heuristic is only activated for the head/, user/, and projects/ branches. A whole-tree merge of project/foo into head/ should thus be correctly represented in git. Merges from head/ to stable/ or from contrib/ to head/ will be plain commits, i.e. "cherry-picks".   * SVN merges for single revisions (that span only parts of the tree then), are not really representable as merges in git and instead are called cherry-picks there. The converter tries to be smart about whole tree merges however -- this heuristic is only activated for the head/, user/, and projects/ branches. A whole-tree merge of project/foo into head/ should thus be correctly represented in git. Merges from head/ to stable/ or from contrib/ to head/ will be plain commits, i.e. "cherry-picks".
 +
 +===== September 2019 notes/commits force push =====
 +
 +Sometime around September 2019, refs/notes/commits was force-pushed, breaking fast-forward fetch.  If you had a copy of notes before this, ''%%git fetch%%'' won't automatically update notes do to this change.  To force reset your local copy to the new copy, use:
 +
 +<code>
 +$ git fetch -f <freebsd> refs/notes/commits:refs/notes/<commits_note_name>
 +</code>
 +
 +Where ''%%freebsd%%'' is the name of your %%FreeBSD%% Git remote (if you're not sure, try ''%%origin%%'').  Here, ''%%commits_note_name%%'' is the name of your local copy of %%FreeBSD%% ''%%refs/notes/commits%%'' (if you followed the procedure in this wiki page, try ''%%commits%%'').
  
 ====== Verification ====== ====== Verification ======
  • gitworkflow.1530932987.txt.gz
  • Last modified: 2018/07/07 03:09
  • by SteveWills