Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 3
Message 1 of 2

creating a snippect collection on github or bitbucket - how to achive that ?

Solved! Go to Solution.


hello dear all,

i am pretty new to github and bitbucket.

on  bitbucket i want to create a repo  containing a list of several  /(approx  15 to 20 ) different files that contain

code for learning... so that it looks like so:


i want to get such  stucture: https://github.com/CoreyMSchafer/code_snippets


code_snippet1

code_snippet2

code_snippet3

code_snippet4

code_snippet5

code_snippet6

code_snippet7

code_snippet8

code_snippet9

code_snippet10


and so forth. .

again: i want to get such  stucture: https://github.com/CoreyMSchafer/code_snippets


well - how can i do that - how can i achieve that!?

 

 

1 Reply
Solution
Commander Lvl 2
Message 2 of 2

Re: creating a snippect collection on github or bitbucket - how to achive that ?

In order to do what you ask you need to follow this algorithm:

  1. Create repository on bitbucket
  2. Clone the repository in local
  3. Inside the repository create directory called "code_snippet1" and put inside of it all the file relative to the snippet1
  4. Than create directory called "code_snippet2" and put inside of it all the file relative to the snippet2
  5. Than create directory called "code_snippet3" and put inside of it all the file relative to the snippet3
  6. And so on...
  7. Now you need to add, commit and push this files, this depends on how you want to do this:
    1. With commands:
      1. git add *
      2. git commit -m "create snippets"
      3. git push origin master
    2. With a graphical interface:
      1. Github desktop
      2. Gitkraken
      3. Other git interface: similar github desktop apps
  8. if you need to add some more snippets return to 3
  9. Else you have done

 

Ask for more details...

 

-Gabriele-