-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.py
31 lines (25 loc) · 1.1 KB
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import os
#while writing commit use escape characters or white space eg. "Update\ README.md"
print('The current working directory is')
os.system('pwd')
#clone, set up origin, upstream, make changes, push to local origin, finally pull request
#init and clone
os.system('git init')
url=input('Enter url of forked repo if not configured, else press enter: ')
clone='git clone '+url
os.system(clone)
#set remote origin, your local copy
orgadd='git remote add origin '+url
os.system(orgadd)
os.system('git remote -v')
print("======================================================================================================================\n")
#set upstream
upstadd='git remote add upstream '+ input('Enter url to the original repo if not configured, else press enter:: ')
os.system(upstadd)
os.system('git remote -v')
print("======================================================================================================================\n")
#branch and make changes
branch_name=input('Enter branch-name to commit: ')
branch='git checkout -b '+branch_name
os.system(branch)
print('Time to make some changes!')