[ubuntu-za] trying to create a working git repository in my Ubuntu Linux
nico.michael at arduino.org.za
nico.michael at arduino.org.za
Fri Apr 4 13:20:33 UTC 2014
Hi Bruce
Nothing is working my git repository is broken
in my folder I have a .git folder
and not myproject.git
I should have used SVN its much easier to get to work
should I give up ?
Every article I google is different from the next
Why did Linus make such a unwanderful program ?
regards
Nico
Quoting Bruce Pieterse <dev at otq.za.net>:
> On 03/04/2014 17:19, nico.michael at arduino.org.za wrote:
>> Hi there
>>
>> I have used the following steps to create a repository
>> add a dummy text file so i can send it to my Git server
>>
>> cd /home/nico/git
>> mkdir MY_JAVA_PROJECT
>> cd MY_JAVA_PROJECT/
>> git init
>> touch deleteme.txt
>> git add .
>> Got error added this to fix it :
>> git config --global user.name "nickm"
>> git config --global user.email "nico.michael at arduino.org.za"
>>
>> git commit -m "initial commit"
>>
>>
>> local/path/to/local/project> git checkout mybranch
>> got Error : error: pathspec 'mybranch' did not match any file(s)
>> known to git.
>>
>> Please advise
>>
>> regards
>> Nico
>>
> Hi Nico,
>
> git checkout mybranch checks out a local branch if it exists. In
> this case mybranch doesn't.
>
> If you need to push to a server you need to add a remote:
>
> git remote add origin <gituser>@<gitserver>:<path/to/repo> i.e.
> git at git.myserver.co.za:project.git
>
> Once that is done you can then push your untracked branch, master as
> this is where all commits go if it is a new repository, to the
> server with:
>
> git push origin -u master
>
> This is optional and is default for user.name you should actually
> set it like:
>
> git config --global user.name "Nico Michael"
>
> So when you do git log it will come up with
>
> commit 4a02eca82dfbfb2008ea59c128bd6cb66555aa88
> Author: Nice Michael <nico.michael at arduino.org.za>
> Date: Thu Apr 3 18:30:16 2014 +0200
>
> Summary of changes
>
> * Change 1
> * Change 2
>
> Resolves issue #12345
>
> --
> All the best,
>
> Bruce
>
> FSF Member 10674 / The FSF is a charity with a worldwide mission to
> advance software freedom / Join the Free Software Foundation:
> http://www.fsf.org/register_form?referrer=10674
>
>
More information about the ubuntu-za
mailing list