Created
November 20, 2020 03:44
-
-
Save ernielikesapple/3ebd182612bdcb3c8e1d49f6dc62bb3f to your computer and use it in GitHub Desktop.
colabGitWorkflow.ipynb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"nbformat": 4, | |
"nbformat_minor": 0, | |
"metadata": { | |
"colab": { | |
"name": "colabGitWorkflow.ipynb", | |
"provenance": [], | |
"authorship_tag": "ABX9TyPcBGWW+NdiliPlLA1tJFic", | |
"include_colab_link": true | |
}, | |
"kernelspec": { | |
"name": "python3", | |
"display_name": "Python 3" | |
} | |
}, | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "view-in-github", | |
"colab_type": "text" | |
}, | |
"source": [ | |
"<a href=\"https://colab.research.google.com/gist/ernielikesapple/3ebd182612bdcb3c8e1d49f6dc62bb3f/untitled2.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "ZCSG7JvWutEo" | |
}, | |
"source": [ | |
"from google.colab import drive\n", | |
"drive.mount('/content/gdrive')" | |
], | |
"execution_count": null, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "Bw0EOipDuxz-" | |
}, | |
"source": [ | |
"%cd /content/gdrive/My Drive/#add your custom working directory" | |
], | |
"execution_count": null, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "4wNKpFQ7uwRR" | |
}, | |
"source": [ | |
"!pwd" | |
], | |
"execution_count": null, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "C-TRd8nNu5CS" | |
}, | |
"source": [ | |
"!git init\n" | |
], | |
"execution_count": null, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "0slpxoH9u5mh" | |
}, | |
"source": [ | |
"!git remote add origin https://{github_username}:{github_password}@github.com/{github_username}/{github_repo_name}.git\n", | |
"!git remote -v" | |
], | |
"execution_count": null, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "RJB2TCiDvKJJ" | |
}, | |
"source": [ | |
"!git config --global user.email '{user_email}'\n", | |
"!git config --global user.name '{user_name}'" | |
], | |
"execution_count": null, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "80ePyxvhvNzK" | |
}, | |
"source": [ | |
"!git add .\n", | |
"!git commit -m 'First commit'" | |
], | |
"execution_count": null, | |
"outputs": [] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "HlehQ2h3vUKD" | |
}, | |
"source": [ | |
"!git push origin master\n" | |
], | |
"execution_count": null, | |
"outputs": [] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment