473,657 Members | 2,523 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using GIT to get remote code

xarzu
88 New Member
I do not know from the online tutorial if I am properly establishing a connection with a git repository that is on a network.

All I have learned from a tutorial is how to set up a local repository, but getting data off of a network repository is knowledge I have yet to stumble upon or learn about and I wanted to save time by asking some online help forums.

I have just started using git after not using it for a while.
I have created a repository.
Then, as I was instructed, I made a “git clone” command which consisted of “git clone” followed by a path.
I expected this to get the contents of the path and put it into my repository – meaning the directory I made. This did not happen. What do I do?
How do I get a local copy of a remote work space for me to work on?

I am wondering if there is something like a "fetch" command I should be using.

The video tutorial I was looking at instructed how to make a local repository. But if I am trying to get code from a network location, how do I go about making that happen?

I was instructed at my job to run this command (copied here in pseudo code)

git clone blah-blah:/blah/git/noogie/dork_monkey/

and when I did this grom git-bash it did not produce any errors which led me to think it was the command I needed to do.

But I did this from the local directory that I used

git init

to set up as a locak repository.

I assumed that typiing a "git clone..." command would have copied all of the files on the blah-blah server over.

But it did not.

I wonder if all this might have something to do with the fact that I need to get my network up and running first.

In my File File Explorer window, when I click on the "This PC" icon on the left, I can see I have five Network locationis mapped to drive letters.

But when I click on the Network icon I get an error.
Dec 26 '21 #1
2 13222
Niheel
2,456 Recognized Expert Moderator Top Contributor
If you're connected to the internet and the server can be accessed without git, you should be able to fetch the contents.

git init setups a new repository for new code

when you do git clone https://github.com/example-repo/example-lib it should pull and setup a local respository of the code for you, which you can start manipulating and pushing to that

Expand|Select|Wrap|Line Numbers
  1. # get public repo
  2. git clone https://server/repo-location
  3.  
  4. # make changes
  5. git add --all  // add the changed files and folders  to git tracking
  6. git commit -m 'message with changes' // commits above changes
  7.  
  8. # commit only adds changes to your local repo, now you have to push to the public repo
  9. git push
  10.  
  11. # to get changes made from other contributors to the repo
  12. git fetch
  13.  
references:
https://git-scm.com/docs/git-clone
https://git-scm.com/docs/git-init
https://git-scm.com/docs/git-add
https://git-scm.com/docs/git-push
https://git-scm.com/docs/git-fetch
Dec 27 '21 #2
xarzu
88 New Member
I double checked my network connection and tried again.

This time, I was prompted to give a password but all of my attempts failed. So, can it be that I just don't have the permissions? Could it be that I don't have network access at all?
Jan 1 '22 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
1420
by: SimonH | last post by:
Hi all, I was thinking about setting up a staging server reunning windows 2003 Server. Up until now I've always used my local machine to perform development because I don't know how to get debugging working on a remote machine. And frankly, sometimes getting debugging to work on my own machine can be a total pain in the arse. But now I'm going to give it a shot.
3
1146
by: A. K. Bhardwaj | last post by:
Hi everybody, I wanted to develop a windows based application in C# which will use remotely located SQL server via internet. Please tell me how to do this .. as i don't have the any idea about how to connect to SQL server remotely over the internet... Thanks in Advance... Regards Anil K Bhardwaj
2
1314
by: Rob R. Ainscough | last post by:
What is it with Microsoft, do they normally publish tools that don't work and provide migrations that don't work either? Publish Web just goes to never never land once I log into my server after the User/Password login screen -- just a partially repainted VS 2005 screen and nothing else, no errors, no warnings, nothing. Just one more feature that doesn't work. I think I passed my limit of sanity some time ago. As far as ASP 1.1 to ASP...
0
1334
by: John Holmes | last post by:
I would like to develop my asp.net applications on a remote development IIS server that has all of our website on it so the image paths work correctly and so I can work with others. I am using Visual Sourcesafe as well. I developed a website initially and copied the files over to the network IIS server and then went through the process of installing the .NET Framework version 2 and configuring the virtual directory to use that version and...
1
4976
by: anonieko | last post by:
Problem When Remote Desktop to my main office machine, and when trying to connect to SQL Express, I was becoming increasingly frustrated with the following error: Error: 'Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.'
0
929
by: Mitkip | last post by:
Hi ! I'll try to be as clear as possible : I would like to deploy a .NET application on a server, and use it from another server. This other server could for example, call by a batch file this application and send it parameters, then the .NET application will use this parameters to write databases. Does someone have an idea about how to do it ? I've heard about COM+ components and windows services, but can someone tell me more about ?
5
1717
by: pyapplico | last post by:
Is there any possible way that I can place a .py file on the internet, and use that source code in an .py file on my computer?
2
2260
by: Adam McCormack | last post by:
Good morning! I am on a project where we are migrating a site running on perl and mysql on IIS. The current configuration is with everything on one server, both IIS and MySQL. The new configuration has IIS on one server, and MySQL on another, both machines are approximately equivalent to the old (aka current) box power wise.. The problem I am having is that a given script (granting it is based on an ugly query with 7 joins) runs in a...
2
1970
by: raffaeleM | last post by:
Hi all, I have a problem regarding the access to a DB located on the server SR1 from a DB located on a server SR2. I have to run a recursive select using tables on SR1 and use the result set in the db on server SR2. I tryed to define a function on server SR1 and call it from the server SR2 using function template and function mapping but I can't call the remote function because it seems not existent in SR2 db. Can you, please, tell me some...
4
5302
by: chris | last post by:
Hi guys I have a Frontend and Backend DB that works well on my LAN. I use a INI file Path, to access a mapped network connection back to the Backend Data file. Path=F:\Server\Data.mdb I have a situation now that requires a Remote Connection with my
0
8316
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8833
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8737
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8509
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8610
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6174
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4168
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4327
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2735
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.