Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
J
jsdelivr-uploader
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
jsdelivr-uploader
Commits
52ef221d
Commit
52ef221d
authored
Sep 03, 2021
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add reset for existing checkout
parent
06b93152
Pipeline
#5223
passed with stages
in 38 minutes and 16 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
src/app.service.ts
src/app.service.ts
+4
-1
No files found.
src/app.service.ts
View file @
52ef221d
import
{
Connection
,
Repository
}
from
'
typeorm
'
;
import
{
Connection
,
Repository
}
from
'
typeorm
'
;
import
{
InjectConnection
}
from
'
@nestjs/typeorm
'
;
import
{
InjectConnection
}
from
'
@nestjs/typeorm
'
;
import
{
ConsoleLogger
,
Injectable
}
from
'
@nestjs/common
'
;
import
{
ConsoleLogger
,
Injectable
}
from
'
@nestjs/common
'
;
import
simpleGit
,
{
SimpleGit
}
from
'
simple-git
'
;
import
simpleGit
,
{
ResetMode
,
SimpleGit
}
from
'
simple-git
'
;
import
{
ConfigService
}
from
'
@nestjs/config
'
;
import
{
ConfigService
}
from
'
@nestjs/config
'
;
import
path
from
'
path
'
;
import
path
from
'
path
'
;
import
{
File
}
from
'
./entities/File.entity
'
;
import
{
File
}
from
'
./entities/File.entity
'
;
...
@@ -178,6 +178,9 @@ export class AppService extends ConsoleLogger {
...
@@ -178,6 +178,9 @@ export class AppService extends ConsoleLogger {
await
this
.
git
.
fetch
(
'
origin
'
,
branchName
);
await
this
.
git
.
fetch
(
'
origin
'
,
branchName
);
}
}
await
this
.
git
.
checkout
(
branchName
,
[
'
-f
'
]);
await
this
.
git
.
checkout
(
branchName
,
[
'
-f
'
]);
if
(
fetch
)
{
await
this
.
git
.
reset
(
ResetMode
.
HARD
,
[
`origin/
${
branchName
}
`
]);
}
this
.
log
(
`Checked out existing branch
${
branchName
}
`
);
this
.
log
(
`Checked out existing branch
${
branchName
}
`
);
}
catch
(
e
)
{
}
catch
(
e
)
{
this
.
error
(
this
.
error
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment