0

Being fairly new to Linux and very new to Git, this is proving to be.. problematic.

Can someone please direct me to or tell me the steps required (Ideally step by step) to do this?

I have a directory with my project in it, I want to commit that to Git, I know there is a .gitignore which ignores certain files etc. and I have used GitHub on Windows mainly for local respository stuff which is again the primary purpose now.

Any help on this would be greatly appreciated cheers!

mgibson
  • 6,103
  • 4
  • 34
  • 49

2 Answers2

2

Welcome to git and linux. Here are a few links to get you started

https://help.github.com/articles/set-up-git

http://git-scm.com/book

http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository

http://zrusin.blogspot.com/2007/09/git-cheat-sheet.html

Git for beginners: The definitive practical guide

There are a couple of different ways to do this. The easiest in my opinion is the command line.

Open up a terminal, and cd to the directory that contains the android project.

cd /home/bob/foo
ls

Initialize the git repo, this will create a hidden .git file inside the folder

git init
ls -a

Create your first commit, by adding all files to the working tree

git add . 
git commit -m "My First Commit"

You will now have a master branch, and 1 commit. You can veiw your commit with the following commands

git status
git log

If you aren't comfortable using the command line yet, you could alternatively accomplish all of this with a gui. Here are some programs for linux.

https://git.wiki.kernel.org/index.php/InterfacesFrontendsAndTools#Graphical_Interfaces

Community
  • 1
  • 1
spuder
  • 17,437
  • 19
  • 87
  • 153
0

You can do a simple

git init

in the command line (in the correct directory) to initialize your local repository. Then you just have to add your files and commit them :

git add .
git commit -m "first commit"

I strongly recommand you the read of the first chapters (at least) of the Pro Git free book to help you understand the basics.

cexbrayat
  • 17,772
  • 4
  • 27
  • 22