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
ports:gitquickstart [2021/04/06 13:54] – JurajLutterports:gitquickstart [2021/04/15 07:04] (current) – don't suggest installing all conflicting git flavors at the same time TobiasKortkamp
Line 3: Line 3:
 This page is to capture issues raised on IRC by other committers and users, so This page is to capture issues raised on IRC by other committers and users, so
 we don't lose that info while it gets added to official documentation. The we don't lose that info while it gets added to official documentation. The
-steps here should mirror the more detailed instructions at the below url:+steps here should mirror the more detailed instructions at the below URL:
  
-- https://docs.freebsd.org/en/articles/committers-guide/#git-primer+  * https://docs.freebsd.org/en/articles/committers-guide/#git-primer
  
 ====== Quick Start ====== ====== Quick Start ======
 +
 +===== Getting a git client =====
 +
 +The simplest way to get started with git, today, is to install git from the
 +pre-packaged %%FreeBSD%% packages, or to build the same package yourself in the
 +usual fashion:
 +
 +  * the smallest package with least dependencies:
 +
 +<code>
 +# pkg install -r FreeBSD git-lite
 +</code>
 +
 +  * the full blown git experience with many dependencies:
 +
 +<code>
 +# pkg install -r FreeBSD git
 +</code>
 +
 +  * install from source build
 +
 +<code>
 +# cd /usr/ports/devel/git && make install
 +</code>
 +
 +You're now ready to go.
  
 ===== Getting the Repo ===== ===== Getting the Repo =====
Line 30: Line 56:
 # last fetch, and your attempted push. # last fetch, and your attempted push.
 git config pull.rebase true git config pull.rebase true
 +# fetch the prepare-commit-msg hook
 +fetch https://cgit.freebsd.org/src/plain/tools/tools/git/hooks/prepare-commit-msg -o .git/hooks
 +chmod +x .git/hooks/prepare-commit-msg
 +
 </code> </code>
  
Line 66: Line 96:
 [user] [user]
     # these entries came from ssh you@freefall gen-gitconfig.sh     # these entries came from ssh you@freefall gen-gitconfig.sh
-    name = A Committer +    name =  "A Committer" 
-    email = you@FreeBSD.org+    email = "you@FreeBSD.org"
 </code> </code>
  
Line 236: Line 266:
  
 <code> <code>
-cat/foo: update to v1.2.3+cat/foo: Update to v1.2.3
    
 - fixes the foobinator - fixes the foobinator
Line 289: Line 319:
 <code> <code>
 $ git log --oneline $ git log --oneline
-e7edeb6d7cb7 (HEAD -> main) cat/foo: update to v1.2.3+e7edeb6d7cb7 (HEAD -> main) cat/foo: Update to v1.2.3
 ab8a59366f5a (freebsd/main, freebsd/HEAD) x11-fonts/league-gothic: Update to 1.601 ab8a59366f5a (freebsd/main, freebsd/HEAD) x11-fonts/league-gothic: Update to 1.601
 bafa49e87ea9 update check_ssl_cert to 2.0.0 bafa49e87ea9 update check_ssl_cert to 2.0.0
Line 376: Line 406:
 Date:   Tue Apr 6 12:31:02 2021 +0000 Date:   Tue Apr 6 12:31:02 2021 +0000
  
-    cat/foo: update to v1.2.3+    cat/foo: Update to v1.2.3
 </code> </code>
  
Line 395: Line 425:
 Your branch is up to date with 'freebsd/main'. Your branch is up to date with 'freebsd/main'.
  
-$ git remove -v && git branch -vv+$ git remote -v && git branch -vv
  
 freebsd https://git.freebsd.org/ports.git (fetch) freebsd https://git.freebsd.org/ports.git (fetch)
 freebsd ssh://git@gitrepo.freebsd.org/ports.git (push) freebsd ssh://git@gitrepo.freebsd.org/ports.git (push)
-* main             f190fc172c79 [freebsd/main] cat/foo: update to v1.2.3 +* main             f190fc172c79 [freebsd/main] cat/foo: Update to v1.2.3 
-  my-ports-changes f190fc172c79 cat/foo: update to v1.2.3+  my-ports-changes f190fc172c79 cat/foo: Update to v1.2.3
  
 $ git pull --ff-only freebsd main $ git pull --ff-only freebsd main
Line 417: Line 447:
 ===== Tips ===== ===== Tips =====
  
-  * commit messages should be similar to ''%%cat/foo: update to latest too v1.2.3%%'' see https://docs.freebsd.org/en/articles/committers-guide/#commit-log-message+  * commit messages should be similar to ''%%cat/foo: Update to latest too v1.2.3%%'' see https://docs.freebsd.org/en/articles/committers-guide/#commit-log-message
  
 ===== Common Problems ===== ===== Common Problems =====
Line 467: Line 497:
 and the repository exists. and the repository exists.
 </code> </code>
- 
----- 
  
 ---- ----
  • ports/gitquickstart.1617717283.txt.gz
  • Last modified: 2021/04/06 13:54
  • by JurajLutter