Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove branch name from push #134

Closed
wants to merge 5 commits into from

Conversation

dontlaugh
Copy link
Contributor

It is possible to specify an alternative default initial branch for git
repositories. This is globally configurable with init.defaultBranch.
See man git-init for details.

We should be able to rely on pushing and pulling from the default
branch without explicitly setting "master", or anything else. dstask
will simply push and pull from the remote named "origin" using whatever
default tracking branch is set.

Refs #116

@dontlaugh
Copy link
Contributor Author

I think I'll need to rebase after #133 is merged. I see this when running tests:

❯ make test
go test -v -mod=vendor ./...
go: inconsistent vendoring in /home/coleman/Code/dstask:
	golang.org/x/[email protected]: is explicitly required in go.mod, but vendor/modules.txt indicates golang.org/x/[email protected]

run 'go mod vendor' to sync, or use -mod=mod or -mod=readonly to ignore the vendor directory
make: *** [Makefile:17: test] Error 1

@Dieterbe
Copy link
Contributor

do i get this right?

  • nowhere in dstask do we refer to the main branch explicitly by name
  • as a user of dstask, do you not configure the name of your main branch in any dstask related env var, or dstask config file
  • the only place that needs configuration is the git repo itself, which, once setup properly, is sufficient to support the above 2

if so, sounds neat.

@dontlaugh
Copy link
Contributor Author

That's correct. It's an internal git setting for repos initialized locally, or it's determined by your github or gitlab configuration.

@dontlaugh dontlaugh force-pushed the 116_default_branch branch from 77313c0 to 2bb857e Compare March 31, 2021 19:27
It is possible to specify an alternative default initial branch for git
repositories. This is globally configurable with **init.defaultBranch**.
See `man git-init` for details.

We should be able to rely on pushing and pulling from the default
branch without explicitly setting "master", or anything else. dstask
will simply push and pull from the remote named "origin" using whatever
default tracking branch is set.

Refs naggie#116
@dontlaugh dontlaugh force-pushed the 116_default_branch branch from 2bb857e to 5adbfe5 Compare April 8, 2021 22:15
@dontlaugh dontlaugh closed this Apr 8, 2021
@dontlaugh dontlaugh deleted the 116_default_branch branch April 8, 2021 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants