problem: github was sold to M$, so can’t use it anymore.

no problem: got ssh running on the server?

than the user is only one step away from hosting one’s own git repository that will be synced up (push) and down (pull) via a secure ssh channel 🙂 GOOD WORK ALL INVOLVED!

check out this:

gnu linux debian – how to create one’s own private git repository in under 10min

while git is probably an excellent source code management system invented by open source dictator Mr Torvalds himself, it ain’t “easy”.

So a cheat sheets and extensive documentation via video are totally legitimate 😀

and here the official cheat sheed from github.com github-git-cheat-sheet.pdf

# ============= github.com cheat sheed

apt-get update;
apt-get install git; # install git

# global config
# sets the username to label your commits
git config --global user.name "[name]";
# sets the email to label your commits
git config --global user.email "[email address]";

# if user is working with eclipse probably
# want to ignore all per-project generated config files
vim ~/.gitignore_global

# fill above file with this content
.classpath
.project
.settings
.idea
.metadata

# cloning the repo to local
# create a new folder for your project
mkdir /projects/projectname;
cd /projects/projectname;

# clone the repo into the current directory
git clone https://github.com/username/reponame.git . ;

# get latest changes to repo from server
git pull;

# where am i: what branch?
git branch;

# show all currently existing branches
git show-branch -a;

# create a new branch
git branch [branch-name];

# switch to specified branch and updates the working directory
git checkout [branch-name];

# combines the specified branch’s history into the current branch
git merge [branch];

# deletes the specified branch
git branch -d [branch-name];

# commit your changes
git commit -a -m 'explain made changes';

# show urls associated with your project
git remote -v;

# comit a branch to githup.com
git push https://github.com/username/NameOfRepo.git "branch_name";
# ===== if you do not want to be asked for your credentials ever time you commit something you can store your username and password in plaintext here:
vim ~/.netrc

machine github.com
login
password

Links:

https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository

liked this article?

  • only together we can create a truly free world
  • plz support dwaves to keep it up & running!
  • (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
  • really really hate advertisement
  • contribute: whenever a solution was found, blog about it for others to find!
  • talk about, recommend & link to this blog and articles
  • thanks to all who contribute!
admin