Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Tutorial 

Manage your code with git

MANAGE YOUR CODE WITH GIT AND GITHUB(linux)


In this tutorial you will learn how to manage version control with git.

First create a git directory to keep thing clean.

Code
mkdir ~/git
then we go to our directory:
Code
cd ~/git

once you are in your directory do:
Code
sudo apt-get install git
This will install git or update it if you already installed it.
Now go to GitHub and create an account.

Once you have your account, create your repository.

In your repository copy your HTTPS clone url.

go back to your terminal and type :
Code
git config --global user.name "My Name"
and
Code
git config --global user.email "[email protected]"
Time to clone! type:
Code
git clone "yourremoteHTTPSadress"

And a folder with the name of your repository should be created!

goto your folder with "cd". if your files are in view only type in the terminal:

Code
chmod 7 "yourfile"

Then you need to initialize your remote:
Code
git remote set-url origin "yourhttpscloneadress"

now add the files you want git to track changes.
Code
git add "file"

Now edit the file you want.
Once edited go to you terminal and type:
Code
git commit

and then
Code
git push

you should be prompted for an username and a password, Use your github credentials.

Done!

this is the end of this tutorial. if you want to know more about git PM me. ✌

That's very light for a tutorial on git... You should at least show hw to connect through SSH and use keys to avoid typing password each time.
(Jul 21, 2015 10:34 AM)Sakuto Wrote:  That's very light for a tutorial on git... You should at least show hw to connect through SSH and use keys to avoid typing password each time.

SSH dont really works for me so...
This is a nice tutorial for newbies.
I do not like git for some reasons though.
(Jul 25, 2015 10:05 PM)Elin Wrote:  This is a nice tutorial for newbies.
I do not like git for some reasons though.

Whow soo long thread i dont know if gravedug or no soo: thank you for the feedback!


Possibly Related Threads...
Thread / Author Replies Views Last Post
by KlonopinApr 20, 2025 06:00 PM 23 1,103 Apr 20, 2025 06:00 PM
Last Post: MavenGradle
by HackersJun 4, 2024 11:18 AM 12 320 Jun 4, 2024 11:18 AM
Last Post: Hackers
by HackersMay 29, 2024 08:26 AM 2 303 May 29, 2024 08:26 AM
Last Post: Hackers