I’m stuck on Stage #CZ2 .
I’ve accomplished the task but can’t push the changes.
Here are my logs:
Your push was rejected because the following files were larger than 1MB:
- ./cmd/myshell/main (2MB)
And here’s a snippet of my code:
package main
import (
"bufio"
"fmt"
"os"
"strings"
)
func main() {
fmt.Fprint(os.Stdout, "$ ")
input, err := bufio.NewReader(os.Stdin).ReadString('\n')
if err != nil {
fmt.Fprint(os.Stderr, "ERROR: ", err)
return
}
input = strings.TrimSpace(input) // to remove the \n
fmt.Fprint(os.Stdout , input + ": command not found\n")
}
Hi @mennatawfiq , could you try removing the large file ./cmd/myshell/main
from your repo by following this guide?
Let me know if you need further assistance.
@mennatawfiq Got it. There is no need to push the main file to our Git server. Our tester automatically rebuilds your code every time you push changes.
Let me know how it goes after you remove the main file.
still having the same problem even after removing the main file
Looks like the main file is still in your commit history.
An easier workaround:
Save main.go
to somewhere else.
Delete the whole repo.
Re-clone the repo from our server.
Move main.go
back.
Could you give this a try, and please let me know how it goes?
1 Like
system
Closed
January 21, 2025, 6:40am
7
This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.