ports and git, first steps
Michael Grimm
trashcan at ellael.org
Tue Mar 2 12:24:18 UTC 2021
Hi,
I am running STABLE-13 and use poudriere (svn+https) to compile my ports of interest.
Disclaimer: I do consider myself a newbie with regard to git.
After my migration from svn to git regarding sources, I recently installed a git repository for ports sources. It is working as expected, good.
But then I added some local ports to the ports directory, which I added to .git/info/exclude. Ok, that worked out.
Now I had had to modify the Makefile of www/wordpress like I did before in the svn ports tree. Now git complained:
mwn> git status
On branch master
Your branch is up to date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: www/wordpress/Makefile
It took 3.44 seconds to enumerate untracked files. 'status -uno'
may speed it up, but you have to be careful not to forget to add
new files yourself (see 'git help status').
no changes added to commit (use "git add" and/or "git commit -a")
Thus I applied 'git commit':
mwn> git commit -a -m "modified to compile wordpress without llvm"
[master 39b5d0652] modified to compile wordpress without llvm
Committer: admin mer-waases.net <root at mer-waases.net>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly. Run the
following command and follow the instructions in your editor to edit
your configuration file:
git config --global —edit
After doing this, you may fix the identity used for this commit with:
git commit --amend --reset-author
1 file changed, 1 insertion(+), 1 deletion(-)
Now, 'git status' shows:
mwn> git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)
It took 3.17 seconds to enumerate untracked files. 'status -uno'
may speed it up, but you have to be careful not to forget to add
new files yourself (see 'git help status').
nothing to commit, working tree clean
Well, that looks fine for a git newbie, But there are some questions left for me:
1) Will my commited Makefile become overwritten if the master Makefile becomes modified in the future? (I hope so)
2) Will all upcoming modifications in 'remote.origin.url=git://github.com/freebsd/freebsd-ports.git' be pulled,
although 'Your branch is ahead of 'origin/master' by 1 commit.'?
3) Is there a better, more suited way to deal with local modifications?
4) In analogy to the recommendations for src and git, I did run 'git config pull.ff only'.
Is that wrong when it comes to ports (I do not understand what that means, yet)
Thanks and regards,
Michael
More information about the freebsd-git
mailing list