Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita8023a0

Browse files
committed
updated readme, added git tag script
1 parent3fc2562 commita8023a0

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

‎22_git_tag.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
importsubprocess
2+
importsys
3+
4+
5+
iflen(sys.argv)==3:
6+
tag=sys.argv[1]
7+
commit=sys.argv[2]
8+
command='git tag -a {0} {1} -m "{2}"'.format(tag,commit,tag)
9+
output=subprocess.check_output(command,shell=True).decode('utf-8')
10+
subprocess.call(command,shell=True)
11+
subprocess.call('git push --tags',shell=True)
12+
else:
13+
print'usage: tag.py TAG_NAME COMMIT'
14+
sys.exit(1)

‎readme.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,6 @@
1919
1.**17_rewrite_git_history.md**: Backdating/Rewriting Git history (use at your own risk)
2020
1.**18_zipper.py**: Zip contents of a directory, adding a timestamp to the filename
2121
1.**19_tsv-to-csv.py**: Convert TSV to CSV
22-
1.**20_restore_file_from_git.py**: Restore file from Git History
22+
1.**20_restore_file_from_git.py**: Restore file from Git History
23+
1.**21_twitter_bot.py**: Twitter Bot
24+
1.**22_git_tag.py**: Create Git Tag based on a commit

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp