Re: [git-users] how *not* to push a certain branch but all others yes
On 07/10/2021 16:51, Uwe Brauer wrote: >> The inconvenience is that you need to remember to create your local branches >> using that convention (and rename current branches - which is easy to do by >> using the `git branch -M` command). > I admit I am confused: I thought I should use the same name as in > remote, so master should be master and not pub_master > > Most likely there is something fundamental I don't understand. Yes, it's easy to be confused. There is NO requirement that the names match. There is no requirement that you even have a local branch that 'tracks' (is a duplicate of) a remote branch you are interested in - This one is really hard to grasp for newer users who weren't there when 'remotes' were invented. You simply, already, have a branch `remote/branch` that is your own local copy of that truly remote server's branch, and you can use that name when you start your feature branch. Like wise, you can use that separation of naming to distinguish your 'keep-local' branches, from your 'happy-to-publish' branches. Philip Git, juggling chainsaws while running in flip-flops ;-) -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/git-users/77d45a5e-658a-4813-d934-d14e434e26a0%40iee.email.
Re: [git-users] how *not* to push a certain branch but all others yes
>>> "KK" == Konstantin Khomoutov writes: Hi Thanks for your detailed answer > On Wed, Oct 06, 2021 at 03:13:11PM +0200, Uwe Brauer wrote: >> I am facing the following situation, a repository I contribute to, has >> at least 3 main branches (2 besides master/main). >> >> Now I sometimes create branch for my own for some fix etc, but I don't >> want to push that branch. >> >> So if you did some changes in the other branches, I would like to push >> them but not my private one. >> >> I know who to push certain branches, but I don't know who to exclude >> certain branches from the push (in mercurial I do this by a concept >> called phases, but this does not exist in git), so any change to do this >> in git? > What command are you currently using to push "all main branches" or had you > also implicitly asked how to do that? No, I thought either git push Or git push --all Does this > The full form of the `git push` command is > $ git push [ ...] > "The refspec" tells Git what remote objects - branches and tags - to update > with what local objects; the details are in the "gitrevisions" manual page - > you can run `git help revisions` to read it. > Now a command to push all local branches to update same-named branches in the > remote repository is this: > $ git push 'refs/heads/*:refs/heads/*' > That "refs/heads/" can be thought of as a namespace containing all the > branches (and you can use your file browser of choice to explore the contents > of the ".git" directory of your local clone - you'll find there that "refs" > directory with the "heads" subdirectory in it, and there will be a set of > files representing your local branches). > So if we need to differentiate between "public" and "private" local branches, > a way to achieve this would be to make a habit to name all "public" branches > with some fixed prefix — say, "pub". Then, you could push all such branches in > one go by running > $ git push origin 'refs/heads/pub/*:refs/heads/*' > and even add an alias like > $ git config --global --add alias.publish 'push origin > refs/heads/pub/*:refs/heads/*' > to be used like > $ git publish > The inconvenience is that you need to remember to create your local branches > using that convention (and rename current branches - which is easy to do by > using the `git branch -M` command). I admit I am confused: I thought I should use the same name as in remote, so master should be master and not pub_master Most likely there is something fundamental I don't understand. Regards Uwe Brauer -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/git-users/87ily87s0p.fsf%40mat.ucm.es. smime.p7s Description: S/MIME cryptographic signature
Re: [git-users] Re: Feature Request: Recognizing which code belongs together and in what file and file segment it belongs.
On 07/10/2021 10:04, Magnus Therning wrote: > > skybuck2000 writes: > >> Here is a "real-world" example: >> >> The original repository is this one: >> https://github.com/PascalCoin/PascalCoin >> >> My restructured repository is this one: >> https://github.com/SkybuckFlying/PascalCoinRestructured > > I only took a quick glance at the two repositories, but it seems you > are in a situation where > > 1. You have a branch with major changes > (https://github.com/SkybuckFlying/PascalCoinRestructured/commit/b6eb90bbb95c40494838a61b0e52c3dc62ab508b > has >10k lines that are changed across 84 files!), and > 2. your branch has lived for a long time (3 years), and > 3. your branch is 3 years behind the upstream master branch. > > I can't help but feel a little sorry for you. > > Maybe that https://github.com/mhagger/git-imerge can help you out of > the predicament you've put yourself in. > > /M > A thought experiment about possible procedure and process... The git diff used for creating patches that represent the changes will extract hunk headers which are meant to represent logical segments of the code. If the files were 'split' at these logical segment headers (that split then promotes each filename to be a directory name, and each segment becomes a file e.g. named with its line range `fileL73-95`), and this split was done for both sides of the merge, then it maybe a reasonable candidate for the new merge -sORT capability which should be a lot better at detecting the file renames and code movements. I guess that the file-with-line-range naming wouldn't work because then everything looks like a rename, but file-with-segment-name should be a lot more stable. Even better would be the compiler's parser for the code that would just split out the major 'functional' segments that the code syntax already defines. It all sounds like those interview questions where you have to tie the pliers to the string and start it swinging so that you can catch it while reaching something else... -- Philip -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/git-users/ecb860f2-2c4a-6f70-92d6-d7e214b8f760%40iee.email.
Re: [git-users] Re: Feature Request: Recognizing which code belongs together and in what file and file segment it belongs.
skybuck2000 writes: Here is a "real-world" example: The original repository is this one: https://github.com/PascalCoin/PascalCoin My restructured repository is this one: https://github.com/SkybuckFlying/PascalCoinRestructured I only took a quick glance at the two repositories, but it seems you are in a situation where 1. You have a branch with major changes (https://github.com/SkybuckFlying/PascalCoinRestructured/commit/b6eb90bbb95c40494838a61b0e52c3dc62ab508b has >10k lines that are changed across 84 files!), and 2. your branch has lived for a long time (3 years), and 3. your branch is 3 years behind the upstream master branch. I can't help but feel a little sorry for you. Maybe that https://github.com/mhagger/git-imerge can help you out of the predicament you've put yourself in. /M -- Magnus Therning OpenPGP: 0x927912051716CE39 email: mag...@therning.org @magthe@mastodon.technology http://magnus.therning.org/ Only put off until tomorrow what you are willing to die having left undone. — Pablo Picasso -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/git-users/878rz5yz7n.fsf%40therning.org. signature.asc Description: PGP signature
[git-users] GIT Private Server on FreeBSD
Hii I am trying to set up a private git server on FreeBSD Machine. I am trying to use smart-http to authenticate. I am attaching apache configuration file(httpd.conf) in "/usr/local/etc/apache24/". My git repos are present inside the folder: /home/git/repos/ test.git is a bare repository. I have set http.receivepack to true in my repo. I am able to clone the repo from another host. But when I try to push the changes, I get the following error: "error: Cannot access URL http://192.168.1.9:80/git/test.git/, return code 22 fatal: git-http-push failed error: failed to push some refs to 'http://192.168.1.9:80/git/test.git/; I have spent several days, editing the Apache config. settings, but with no use. Can someone help with this? -Thanks Sai Kiran. -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/git-users/2c0243ce-76fe-4e7e-b476-d0cca33d7925n%40googlegroups.com. DocumentRoot "/home/git/repos" Alias /git /home/git/repos SetEnv GIT_PROJECT_ROOT /home/git/repos SetEnv GIT_HTTP_EXPORT_ALL ScriptAlias /git/ /usr/local/libexec/git-core/git-http-backend/$1 ScriptAliasMatch \ "(?x)^/git/(.*/(HEAD | \ info/refs | \ objects/(info/[^/]+ | \ [0-9a-f]{2}/[0-9a-f]{38} | \ pack/pack-[0-9a-f]{40}\.(pack|idx)) | \ git-(upload|receive)-pack))$" \ /usr/local/libexec/git-core/git-http-backend/$1 Options +ExecCGI +Indexes AuthType Basic AuthName "Git Authentication" AuthUserFile /home/git/repos/.htpasswd Require valid-user DirectoryIndex test.git