Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Activity for Michaelâ€
| Type | On... | Excerpt | Status | Date |
|---|---|---|---|---|
| Edit | Post #293557 | Initial revision | — | over 1 year ago |
| Answer | — |
A: Why force designation of a remote main branch? These are my theories, but I'm not particularly excited about either of them. Something to see They need something to show when you visit the website's index. Otherwise, `https://www.github.com/you/your-fork` is a really boring page. On the other hand, maybe it should be a boring page.... (more) |
— | over 1 year ago |
| Edit | Post #293552 | Initial revision | — | over 1 year ago |
| Question | — |
Why force designation of a remote main branch? GitHub seems to require that one of the branches on it be marked as the "primary" branch. I understand this (perhaps mistakenly) to be the `origin/HEAD`. Why would they make it compulsory? On forked repositories, I'm usually making branches and submitting pull requests. There's not really a "m... (more) |
— | over 1 year ago |
| Edit | Post #293531 | Initial revision | — | over 1 year ago |
| Answer | — |
A: How to handle correct answers that also include spam? I think this is a judgment call. - If the answerer appears to be a human, you can caution them with How We Do Things Around Here and edit the answer. - If they do it again (and this user has), nuke 'em. Maybe it's feasible to dissociate the post to the Community user or something. Maybe it'... (more) |
— | over 1 year ago |
| Edit | Post #293515 |
Post edited: Supported prettyprint language. Link docs. |
— | over 1 year ago |
| Suggested Edit | Post #293515 |
Suggested edit: Supported prettyprint language. Link docs. (more) |
helpful | over 1 year ago |
| Edit | Post #293516 |
Post edited: Fix typo. Add sample |
— | over 1 year ago |
| Edit | Post #293516 | Initial revision | — | over 1 year ago |
| Answer | — |
A: Get the name of the remote tracked branch of my local branch for use in script I'm not exactly sure what you want with the whole of `rd`, but > …programmatically get the name of the remote branch which my local branch is tracking… sounds very much like the `@{upstream}`/`@{u}` shortcut. You can provide a branch before it to refer to the tracked remote o... (more) |
— | over 1 year ago |
| Comment | Post #293410 |
Good thought, but it turns out I don't need both. Thanks for flagging! (more) |
— | over 1 year ago |
| Comment | Post #293422 |
Thanks! I kept searching for the `advice.*` variables to turn off the hint, but I didn't think to check the output stream itself.
I think I'm going to use this but move the editor assignment in the CLI config override like I have it in OP.
```bash
git -c 'core.editor=echo' config --global... (more) |
— | over 1 year ago |
| Edit | Post #293410 | Initial revision | — | over 1 year ago |
| Answer | — |
A: Get global gitconfig path With help from hkotsubo in the comments, it seems you can follow the behavior described by Git's documentation. This will work until they change it, at least for your \Nixes and \BSDs: ```bash path="${XDGCONFIGHOME:-$HOME/.config}/git/config" [[ -f "$path" ]] && echo "$path" || echo "$HOME/.... (more) |
— | over 1 year ago |
| Comment | Post #293406 |
Ah, so I could do something like
```bash
path="${XDG_CONFIG_HOME:-$HOME/.config}/git/config"
[[ -f "$path" ]] && echo "$path" || echo "~/.gitconfig"
``` (more) |
— | over 1 year ago |
| Edit | Post #293406 |
Post edited: system -> user |
— | over 1 year ago |
| Comment | Post #293406 |
I want global, not system. You are right, that is not clear. (more) |
— | over 1 year ago |
| Edit | Post #293406 | Initial revision | — | over 1 year ago |
| Question | — |
Get global gitconfig path Is there a command I can run to get the path of global `gitconfig` for a user? Like `git config --global --edit`, but I want the path, not an editor window. I want the right path whether or not this file already exists. i.e. I want the path that Git will use, even if this is a brand new system... (more) |
— | over 1 year ago |
| Comment | Post #292140 |
Haha. And I forgot that if you omit the branch name, it just assumes you mean your `HEAD`. Good reminder! (more) |
— | over 1 year ago |
| Comment | Post #292140 |
I would 100% use the syntax from the top of this answer, but it *is* possible to generalize it.
```sh
git merge branch_name@{u}
``` (more) |
— | over 1 year ago |
| Edit | Post #292979 |
Post edited: Markdown formatting |
— | almost 2 years ago |
| Suggested Edit | Post #292979 |
Suggested edit: Markdown formatting (more) |
helpful | almost 2 years ago |
| Edit | Post #292900 |
Post edited: JetBrains has different tools than I remember |
— | almost 2 years ago |
| Edit | Post #292900 | Initial revision | — | almost 2 years ago |
| Answer | — |
A: C#: Performance hit from using calculated property instead of get-only property with initializer? You're right about the recalculation, as you can see from some easy experimentation by rigging two (dynamic) properties and logging what each one gives you. ```csharp public long TimeStamp1 { get; } = DateTime.Now.Ticks; public long TimeStamp2 => DateTime.Now.Ticks; Console.Log(Foo.TimeSt... (more) |
— | almost 2 years ago |
| Comment | Post #291131 |
I ran across [this blog post](https://shazow.net/posts/how-to-maintain-a-successful-open-source-project/) from the maintainer of Python's `urllib3`. I may summarize it into an answer at some point, but you can read the original post in the meantime. (more) |
— | almost 2 years ago |
| Comment | Post #292814 |
As of this writing, Spacy doesn't have [a pip package](https://pypi.org/project/spacy/) for Python 3.13. (more) |
— | almost 2 years ago |
| Comment | Post #292707 |
My personal suspicion is that ReSharper thinks most people _meant_ to have dynamic resolution of the property getter. ReSharper would then expect people to be _surprised_ to discover that the initial value is never changed. (I can submit this as an answer if that's useful.) (more) |
— | almost 2 years ago |
| Comment | Post #292707 |
Try it with dynamic values and see what happens. Then you can answer your own question.
```csharp
public long TimeStamp1 { get; } = DateTime.Now.Ticks;
public long TimeStamp2 => DateTime.Now.Ticks;
Console.Log(Foo.TimeStamp1);
Console.Log(Foo.TimeStamp2);
Thread.Sleep(3000);
Console.Lo... (more) |
— | almost 2 years ago |
| Edit | Post #292619 |
Post edited: Markdown formatting. Minor grammar help. |
— | almost 2 years ago |
| Suggested Edit | Post #292619 |
Suggested edit: Markdown formatting. Minor grammar help. (more) |
helpful | almost 2 years ago |
| Edit | Post #291977 |
Post edited: Fix broken image |
— | almost 2 years ago |
| Edit | Post #291211 |
Post edited: Quote the doc directly, for clarity |
— | almost 2 years ago |
| Edit | Post #292472 |
Post edited: Clarifications. |
— | about 2 years ago |
| Suggested Edit | Post #292472 |
Suggested edit: Clarifications. (more) |
helpful | about 2 years ago |
| Edit | Post #292393 | Initial revision | — | about 2 years ago |
| Answer | — |
A: Turn all changes after latest origin/main into a branch First you want to make your new branch at `HEAD` (current `main`). Then you want to point `main` back to `origin/main`. ```sh Create new branch git branch newbranchname Point main back at origin git reset --hard origin/main ``` (more) |
— | about 2 years ago |
| Edit | Post #292163 |
Post edited: Inline links. |
— | about 2 years ago |
| Edit | Post #292170 |
Post edited: Link more configuration. Add some more explainer in a footnote. |
— | about 2 years ago |
| Comment | Post #292170 |
The `ini` prettyprint language should have a `\b` marker in whatever they're doing at the end of `on` so `only` doesn't match. (more) |
— | about 2 years ago |
| Edit | Post #292170 | Initial revision | — | about 2 years ago |
| Answer | — |
A: After git fetch, how to fast forward my branch? The answer by hkotsubo is correct. But just in case you're being very specific about fast-forwarding, it's worth stressing that you can use `--ff-only` as an option on the merge to abort if it requires a merge commit. ```sh git merge --ff-only origin/branchname ``` Where is this useful? I... (more) |
— | about 2 years ago |
| Edit | Post #292163 | Initial revision | — | about 2 years ago |
| Answer | — |
A: How to establish a relationship between HTML elements (tags)? (i.e., how can one element refer to another one) I'm not sure how much this helps or inspires you, but there's an XML schema for the US Code and for bills and amendments to change it. See xml.house.gov and the GitHub repository for United States Legislative Markup. They may already have XSLT transformations to HTML for current-version and/or di... (more) |
— | about 2 years ago |
| Comment | Post #292135 |
> Git is specifically a versioning system for code repositories, so it 100% belongs on Software Development.
Agreed
> Git questions should all be banned for every community other than this one,
Meh. I think that's a little too far, but if there's broad consensus I'll take that into consi... (more) |
— | about 2 years ago |
| Suggested Edit | Post #292082 |
Suggested edit: Grammar (more) |
helpful | about 2 years ago |
| Comment | Post #291978 |
Apparently, there is [already a project](https://github.com/spyder-ide/pysyntect) for Syntect bindings in Python. (more) |
— | about 2 years ago |
| Edit | Post #291970 |
Post edited: Nest the workflow summary |
— | about 2 years ago |
