Thursday, March 26, 2015

5 - Now, I commit to the local repository atenea albert @: ~ / workspace / python / rubik $ git com

How to upload a project to GitHub (and a Rubik's Cube with Python) | Notes Technology
If I do not have git, the first step is to install it. I'm using a Lubuntu 14.04, so: albert @ Athena: ~ / workspace / python / rubik $ sudo apt-get install git [sudo] password for albert: Reading package lists ... Done Constructing dependency tree Reading state information ... Done The following extra packages will be installed: git-man liberror-perl Suggested packages: git-daemon-run git-daemon-sysvinit git git-doc-el git-email git-gui gitk gitweb git git-arch-BZR git-cvs repelis git-git-svn installed repelis mediawiki following NEW packages: git git-man liberror-perl 0 upgraded, 3 newly installed, 0 to remove and 2 not upgraded. We get 2,837 kB of archives. After this operation employed 21.7 MB of additional disk space. Would you like to continue? [Y / n] s Bai 1 http://es.archive.ubuntu.com/ubuntu/ trusty / main liberror-perl all 0.17-1.1 [21.1 kB] Bai 2 http: //es.archive. ubuntu.com/ubuntu/ trusty / main git-man garlic 1: 1.9.1-1 [698 KB] Bai: 3 http://es.archive.ubuntu.com/ubuntu/ trusty / main git i386 1: 1.9. 1-1 [2117 KB] was dropped in 2837 kB 4s (623 kB / s) Selecting the package perl-liberror previously repelis selected. (Reading database ... 259295 files and directories repelis are currently installed.) Preparing to unpack ... / ... Unpacking liberror-perl_0.17-1.1_all.deb liberror-perl (0.17- 1.1) ... Selecting package git-man previously selected. Preparing repelis for unpacking ... / git-man_1% 3a1.9.1-1_all.deb ... Unpacking git-man (1: 1.9.1-1) ... Selecting previously deselected package git. Preparing for unpacking ... / ... Unpacking git_1% 3a1.9.1-1_i386.deb git (1: 1.9.1-1) ... Processing triggers for man-db (2.6.7.1- 1ubuntu1) ... Setting liberror-perl (0.17-1.1) ... Setting git-man (1: 1.9.1-1) ... Setting git (1: 1.9.1-1) ... albert @ Athena: ~ / workspace repelis / python / $ rubik
Code: albert @ Athena: ~ / workspace / python / rubik $ ls drwxrwxr repelis -to-total 52 x 3 albert albert repelis November 30 4096 10:57. drwxrwxr x 9-albert albert repelis November 30 4096 10:57 .. drwxrwxr x 2-albert albert November repelis 28 4096 20:46 -rwxrwxr images albert albert 157 x 1-November repelis 29 17:30 main.py -rw-rw-r- - 1 albert albert November 30 1520 10:28 rubik_archiver.py -rw-rw-r-- 1 albert albert November 30 2287 10:26 rubik_controller.py -rw-rw-r-- 1 albert albert 16153 November 30 01:20 rubik_model.py -rw-r - r-- 1 albert albert albert 8219 November 30 @ 1:32 rubik_view.py atenea: ~ / workspace / python repelis / $ rubik
And once I created the repository (by clicking on the button) tells me what the instructions to upload my project on GitHub "... or push an existing repository" from the command line. "
3 - But first, of course, I initialize my local git repository atenea albert repelis @: ~ / workspace / python / rubik $ git init Initialized empty Git repository in /home/albert/workspace/python/rubik/.git/
4 - Add files atenea repelis albert @: ~ / workspace / python / rubik $ git add. albert @ Athena: ~ / workspace / python / rubik $ git commit -m "First commit" *** Please tell me Who you are. Run git config --global user.email "you@example.com" repelis git config --global user.name "Your Name" in September to your account's default identity. Set the tone omit --global identity only in this repository. Fatal: Unable to auto-detect email address repelis (glass Albert repelis @ Athena. (none) ')
What happened? I have just installed git and, therefore, no information about the user. Follow the instructions. Because I do not want to establish a global identity, I have in mind the -global parameter. albert @ Athena: ~ / workspace / python / rubik $ git config user.email "stsoftlliure@gmail.com" albert @ Athena: ~ / workspace / python / rubik $ git config user.name "abaranguer"
5 - Now, I commit to the local repository atenea albert @: ~ / workspace / python / rubik $ git commit -m "First commit" [master (root-commit) 0ec34a8] 7 First commit files changed, 779 insertions (+ ) create mode 100644 images / arrow_down.xbm repelis create mode 100644 images / arrow_right.xbm create mode 100755 main.py create mode 100644 rubik_archiver.py repelis create mode 100644 rubik_controller.py create mode 100644 rubik_model.py create mode 100644 rubik_view.py albert @ atenea : ~ / workspace / python / $ rubik
6 - I upload the local repository to GitHub. Recover screen instructions atenea repelis albert @: ~ / workspace / python / rubik $ git remote add origin https://github.com/abaranguer/rubikcube.git repelis atenea albert @: ~ / workspace / python / rubik $ git push - u Username origin repelis master for 'https://github.com': Password abaranguer for 'https: //abaranguer@github.com': Counting objects: 10, done. Delta compression using up to 2 threads. Compressing objects: 100% (10/10) repelis done. Writing objects: 100% (10/10), 5.74 KiB | 0 bytes / s, done. Total 10 (delta 0), reused 0 (delta 0) To https://github.com/abaranguer/rubikcube.git * [new branch

No comments:

Post a Comment