Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions packages/dev/src/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,13 @@ export class GitPlugin extends BasePlugin {
spin.start();
await exec(`git push ${this.gitInfo.remoteName} ${this.gitInfo.currenBranch}`);
spin.stop();

// Get current commit info after push
await this.getCurrentGitInfo();
const completionTime = time();
console.log('Push success');
console.log(`Completion time: ${completionTime}`);
console.log(`Commit hash: ${this.gitInfo.lastCommitId}`);
}

async handleStatusDo() {
Expand Down Expand Up @@ -647,6 +653,13 @@ export class GitPlugin extends BasePlugin {

await exec(`git checkout ${currentBranch}`);
console.log('4. Switch back to the original branch:', currentBranch);

// Get current commit info after merge operation
await this.getCurrentGitInfo();
const completionTime = time();
console.log(`Merge operation completed`);
console.log(`Completion time: ${completionTime}`);
console.log(`Commit hash: ${this.gitInfo.lastCommitId}`);
} catch (error) {
console.error('Merge conflict detected. Please resolve the conflicts and commit the changes.');
}
Expand Down