Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a python script to automatically submit assignments through git with the follwoing structure. [student]$ ls in_class labs submissions [student]$ cd sudmissions [student submissons]$ ls
Write a python script to automatically submit assignments through git with the follwoing structure.
[student]$ ls
in_class labs submissions
[student]$ cd sudmissions
[student submissons]$ ls
LAB1 LAB2 LAB3 LAB 4
*Your script should: Take in arguments from the command line First argument is the branch name/assignment name The next n arguments are the files to be submitted. Your commit message should say what files you added. "Added E02.txt" "Added L04.txt task2.c task3.c"
Script should run as following example:
$ . /git_submit.py E02 E02.txt Switching to master branch. . Pulling the latest from master Succesfully branched to E02 Adding the file submissions/E02/E02.txt Committing... Pushing.. - Success! $ ./git_submit.py L04 L04.txt task2.c task3.c Switching to master branch... Pulling the latest from master Succesfully branched to L04 Adding the file submissions/E02/E02.txt Committing... Pushing.. - Success! $ . /git_submit.py E02 E02.txt Switching to master branch. . Pulling the latest from master Succesfully branched to E02 Adding the file submissions/E02/E02.txt Committing... Pushing.. - Success! $ ./git_submit.py L04 L04.txt task2.c task3.c Switching to master branch... Pulling the latest from master Succesfully branched to L04 Adding the file submissions/E02/E02.txt Committing... Pushing.. - Success
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started