Git hub basic guide - SBScodingclub/SBSCodingClub GitHub Wiki
An introduction
Github is a development platform used for the hosting and version control of files. What this means is you can upload a piece of code and work on it with collaborators with totally control of changes with everyone being able to access it and work on it without overwriting other peoples changes.
Github is most commonly used to host open source projects ans as such getting familiar with it and how to interact with it both through the webpage and through your terminal is highly beneficial to your bioinformatic careers.
An overview of how github works and the salient commands to move files around
Step 1:
Make a folder for your github to push and pull to our github. You can make a directory in linux using the code mkdir
Go into the folder using the bash command cd and use the command git init
Step 2:
Now you need to log into github and set stuff up
varun@varun-samsung:~$ git config --global user.name "Varun Venkatesh"
varun@varun-samsung:~$ git config --global user.email "[email protected]"
varun@varun-samsung:~$ git config --global color.ui "auto"
To check your status i.e log in etc use the command git config -l
Git config - - list allows you to see your creds on git Ls - - a to see whats in there Git status is very useful and should always be done
Connecting a repository to git hub.
make a folder using mkdir and then use "git init" to initialize the folder as a repository Go to github and make the repository, take the url and do the things below
varun@varun-samsung:/Desktop/SBScodingclub$ git remote add origin https://github.com/VarunSVenkatesh/SBScodingclub.git
varun@varun-samsung:/Desktop/SBScodingclub$ git remote -v
origin https://github.com/VarunSVenkatesh/SBScodingclub.git (fetch)
origin https://github.com/VarunSVenkatesh/SBScodingclub.git (push)
Usfel cimmand git remote –v what repository im i pulling from
Main GIT commands
Git status --- whats the status Git add "file name" or –A --- adds file to staging area Git commit –m ---- commits file to local respository Git push origin master ---- push to repository Git pull origin master --- pull originGit notes:
Turns out git and git hub are not the same thing git ins the language of version control github is a repository
NEVER NEST GIT REPOSITORI?ES ALSO display file path to picture lets you view images form the terminal
Usfel cimmand git remote –v what repository am I pulling from?
Addition, how to put stuiff on to the staging area
#Let's add all the files to our git staging area git add -A #the -A flag tells it git you want everything
#Now we can commit git commit -m "My first website commit. The begining of greatness"
#Now we push. Note the addendum to normal pushing git push origin master