From nobody Sat Aug 28 20:44:34 2021 X-Original-To: freebsd-git@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4A616178AFB3 for ; Sat, 28 Aug 2021 20:44:38 +0000 (UTC) (envelope-from dbaio@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GxpVG13gSz4t0N for ; Sat, 28 Aug 2021 20:44:38 +0000 (UTC) (envelope-from dbaio@FreeBSD.org) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com [66.111.4.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: dbaio/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 0748FC68B for ; Sat, 28 Aug 2021 20:44:38 +0000 (UTC) (envelope-from dbaio@FreeBSD.org) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailauth.nyi.internal (Postfix) with ESMTP id EA61927C0054 for ; Sat, 28 Aug 2021 16:44:37 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Sat, 28 Aug 2021 16:44:37 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudduhedgudehgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfggtggusehgtderre dttddvnecuhfhrohhmpedfffgrnhhilhhoucfirdcuuegrihhofdcuoegusggrihhosefh rhgvvgeuufffrdhorhhgqeenucggtffrrghtthgvrhhnpedtkefhfedvkeekuedvveduhf duteeuhfdutefhuefhkeduvedttdfftddvteehteenucffohhmrghinhepfhhrvggvsghs ugdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpegusggrihhoodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdduudekudef leduvddtqddvieektddvjeeikedquggsrghioheppefhrhgvvgeuufffrdhorhhgsehfrg hsthhmrghilhdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Sat, 28 Aug 2021 16:44:36 -0400 (EDT) Date: Sat, 28 Aug 2021 17:44:34 -0300 From: "Danilo G. Baio" To: freebsd-git@FreeBSD.org Subject: Phabricator workflow with Git Message-ID: <20210828204434.n45rsndnehy2tsnb@t480.local> List-Id: Discussion of git use in the FreeBSD project List-Archive: https://lists.freebsd.org/archives/freebsd-git List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-git@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="iebmsg3wjstadjx3" Content-Disposition: inline X-ThisMailContainsUnwantedMimeParts: N --iebmsg3wjstadjx3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi. I'm currently using this workflow: - - - - - - - - - - - - - - - - - - - - - - - - - // Create a new branch $ git checkout -b FEATURE // Change stuff and git commit // Note that you already can include the Review information in // Phabricator format. ``` <> Summary: Test Plan: Reviewers: Subscribers: ``` // Open a review with the first commit $ arc diff --create HEAD~ // If it's accepted, fix the commit log message, rebase with main // branch, and push $ git commit --amend $ git rebase -i main $ git push remote_name FEATURE:main // If it's NOT accepted // Change stuff and add a second git commit // Update review with the two commits $ arc diff --update DXXXXX HEAD~2 // If it's accepted, you can soft reset both commits and do a new one // or, just use `git merge and squash`. // merge/squash way // Set the second commit to be squashed $ git rebase -i main ``` pick 954c5d4626 Readme: First commit squash 7231873f23 Makefile: Second commit ``` or $ git reset --soft HEAD~2 // And add a final commit // Submit $ git push remote_name FEATURE:main // Delete FEATURE branch $ git checkout main $ git pull origin main --no-ff $ git branch -d FEATURE - - - - - - - - - - - - - - - - - - - - - - - - - That is it. I know there are git-arc (tools/tools/git-arc) on base, but I still didn't use it. I just want to check if there are other ways to do that (that you recommend), or if can I document it, at least for now, on our Phabricator Wiki page [1]. 1 - https://wiki.freebsd.org/Phabricator Regards. --=20 Danilo G. Baio (dbaio) --iebmsg3wjstadjx3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAABCgB9FiEEORj0UTsjzCy+enIkmpN7LfMuiNcFAmEqoC5fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDM5 MThGNDUxM0IyM0NDMkNCRTdBNzIyNDlBOTM3QjJERjMyRTg4RDcACgkQmpN7LfMu iNeDBg/+KXKbIDTRABliByBtpp7dkTkQNoTVnJ1unvwyi5+wI3oaFc0wc/wjaQ0M djFBCoQAvCxPTv3AA6cX1aMlUyOy3t+1+UPHrVkL6NDPkoEWAxcr389oPBcGopv8 bknINgBN4gRav8/gXXXt7M4hktzqyWNck0gxsh9KMXuXSd5584B6ZY6TfBSWP+dW 9dNg0zZ7B3y93k9utfLt/UTF48saMsuuJJubK2m6ReLuzaPy9pH985A9pVjclHQr PctJOBWAY46Eo81Xge/oV3sgh7cm3nHfQg8hAn6jt4QMIoyO+eHOGSuEdhYVLVHi BoF89MCCZQaWpBCicvHAuO+rbwAika61Au9McIoj1PHzIqX6fNYBWMsAfMxf1JKV t1HOIPVbqQfjMGCdtZ9fTD1ZyObX77Jl+0PdStTjQpQi0NvksnVdiqHkZHoST+HM Yihejo79UL7ZUPEDM45E32/P5ZtDkXIVmIXFsf7hWux1N4k9tS7ohnQjNZpUPqlF ks3Z67iyoI7IQKmC5pNlyHsZrB8/H5xnBA/E694qs+sKe28KBPwt8ReevFUnq9Qd /01M3H6QlXyoBzOWR0bqk72awkcqrGcEqNCXkwvwAcAC5/Q/g6kjilplYcPwJ8ov FiDvuIGeG+g546XIcA0iQ12zHPytgnIyxEn3VKLfC3XkDHsY25k= =sZFC -----END PGP SIGNATURE----- --iebmsg3wjstadjx3--