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

Update README to be clear that git v2.28 or later is needed (to support git init -b) #1424

Closed
wants to merge 1 commit into from

Conversation

gherlein
Copy link
Contributor

I stupidly missed the git init step on an Ubuntu 20.10 EC2 instance (quite a common instance type) and was confused when git init -b failed. Updating the readme to hopefully help someone else.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@codecov-commenter
Copy link

Codecov Report

Merging #1424 (9927d2a) into main (d90284c) will decrease coverage by 0.05%.
The diff coverage is 94.16%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1424      +/-   ##
==========================================
- Coverage   88.06%   88.00%   -0.06%     
==========================================
  Files         132      134       +2     
  Lines        5109     5144      +35     
  Branches     1207     1194      -13     
==========================================
+ Hits         4499     4527      +28     
- Misses        610      617       +7     
Impacted Files Coverage Δ
src/awscdk/cdk-config.ts 100.00% <ø> (ø)
src/cdk/consts.ts 100.00% <ø> (+36.36%) ⬆️
src/github/github-project.ts 100.00% <ø> (ø)
src/javascript/node-project.ts 81.38% <83.33%> (-2.05%) ⬇️
src/javascript/prettier.ts 85.71% <85.71%> (ø)
src/awscdk/awscdk-app-ts.ts 92.53% <100.00%> (ø)
src/awscdk/cdk-tasks.ts 100.00% <100.00%> (ø)
src/build/build-workflow.ts 94.73% <100.00%> (-0.79%) ⬇️
src/cdk/jsii-project.ts 92.07% <100.00%> (-0.23%) ⬇️
src/github/auto-approve.ts 100.00% <100.00%> (ø)
... and 15 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 51c1bf1...9927d2a. Read the comment docs.

Copy link
Contributor

@Chriscbr Chriscbr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and was confused when git init -b failed

I think it might be possible to fix this directly instead to save future users' pain:

git('init -b main');

What if we run git init followed by git branch -m main instead?

@gherlein
Copy link
Contributor Author

That would probably be better, since Ubuntu 20.04 is LTS and will be a very common platform for many

Copy link
Contributor

@eladb eladb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooouch. Would it make more sense to check the git version and use the previous set of commands as a fallback?

@gherlein
Copy link
Contributor Author

That's even better. Maybe with a note to the user "older version of git found, using fallback command list; please consider upgrading to a version of git >= 2.28" or something like that

@gherlein
Copy link
Contributor Author

I'll submit a new PR with a fix

@gherlein gherlein closed this Dec 30, 2021
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.

None yet

4 participants